Blob Blame History Raw
<!-- Creator     : groff version 1.22.3 -->
<!-- CreationDate: Mon Sep  3 22:55:08 2018 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<meta name="generator" content="groff -Thtml, see">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }


<p>ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual

<p style="margin-top: 1em"><b>NAME</b></p>

<p style="margin-left:6%;"><b>archive_write_get_bytes_per_block</b>,
<b>archive_write_set_bytes_in_last_block</b> &mdash;
functions for creating archives</p>

<p style="margin-top: 1em"><b>LIBRARY</b></p>

<p style="margin-left:6%;">Streaming Archive Library
(libarchive, -larchive)</p>

<p style="margin-top: 1em"><b>SYNOPSIS</b></p>

<p style="margin-left:6%;"><b>#include

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>

<p style="margin-left:12%;"><b>archive_write_get_bytes_per_block</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>

<p style="margin-left:12%;"><b>archive_write_set_bytes_per_block</b>(<i>struct&nbsp;archive&nbsp;*</i>,

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>

<p style="margin-left:12%;"><b>archive_write_get_bytes_in_last_block</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>

<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>

<p style="margin-left:12%;"><b>archive_write_set_bytes_in_last_block</b>(<i>struct&nbsp;archive&nbsp;*</i>,

<p style="margin-top: 1em"><b>DESCRIPTION <br>

<p style="margin-left:17%;">Sets the block size used for
writing the archive data. Every call to the write callback
function, except possibly the last one, will use this value
for the length. The default is to use a block size of 10240
bytes. Note that a block size of zero will suppress internal
blocking and cause writes to be sent directly to the write
callback as they occur.</p>

<p style="margin-top: 1em"><b>archive_write_get_bytes_per_block</b>()</p>

<p style="margin-left:17%;">Retrieve the block size to be
used for writing. A value of -1 here indicates that the
library should use default values. A value of zero indicates
that internal blocking is suppressed.</p>

<p style="margin-top: 1em"><b>archive_write_set_bytes_in_last_block</b>()</p>

<p style="margin-left:17%;">Sets the block size used for
writing the last block. If this value is zero, the last
block will be padded to the same size as the other blocks.
Otherwise, the final block will be padded to a multiple of
this size. In particular, setting it to 1 will cause the
final block to not be padded. For compressed output, any
padding generated by this option is applied only after the
compression. The uncompressed data is always unpadded. The
default is to pad the last block to the full block size
(note that <b>archive_write_open_filename</b>() will set
this based on the file type). Unlike the other
&rsquo;&rsquo;set&rsquo;&rsquo; functions, this function can
be called after the archive is opened.</p>

<p style="margin-top: 1em"><b>archive_write_get_bytes_in_last_block</b>()</p>

<p style="margin-left:17%;">Retrieve the currently-set
value for last block size. A value of -1 here indicates that
the library should use default values.</p>

<p style="margin-top: 1em"><b>RETURN VALUES</b></p>

<p style="margin-left:6%;"><b>archive_write_set_bytes_per_block</b>()
and <b>archive_write_set_bytes_in_last_block</b>() return
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>

<p style="margin-left:6%; margin-top: 1em"><b>archive_write_get_bytes_per_block</b>()
and <b>archive_write_get_bytes_in_last_block</b>() return
currently configured block size (</p>

<p>-1 indicates the default block size ), or

<p style="margin-top: 1em"><b>ERRORS</b></p>

<p style="margin-left:6%;">Detailed error codes and textual
descriptions are available from the <b>archive_errno</b>()
and <b>archive_error_string</b>() functions.</p>

<p style="margin-top: 1em"><b>SEE ALSO</b></p>

<p style="margin-left:6%;">tar(1), libarchive(3),
archive_write_set_options(3), cpio(5), mtree(5), tar(5)</p>

<p style="margin-left:6%; margin-top: 1em">BSD
February&nbsp;2, 2012 BSD</p>