1 <!-- Creator : groff version 1.22.3 -->
2 <!-- CreationDate: Sun Jun 19 19:54:07 2016 -->
3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
4 "http://www.w3.org/TR/html4/loose.dtd">
7 <meta name="generator" content="groff -Thtml, see www.gnu.org">
8 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
9 <meta name="Content-Style" content="text/css">
10 <style type="text/css">
11 p { margin-top: 0; margin-bottom: 0; vertical-align: top }
12 pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
13 table { margin-top: 0; margin-bottom: 0; vertical-align: top }
14 h1 { text-align: center }
23 <p>ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual
24 ARCHIVE_WRITE_BLOCKSI...</p>
26 <p style="margin-top: 1em"><b>NAME</b></p>
29 <p style="margin-left:6%;"><b>archive_write_get_bytes_per_block</b>,
30 <b>archive_write_set_bytes_per_block</b>,
31 <b>archive_write_get_bytes_in_last_block</b>,
32 <b>archive_write_set_bytes_in_last_block</b> —
33 functions for creating archives</p>
35 <p style="margin-top: 1em"><b>LIBRARY</b></p>
37 <p style="margin-left:6%;">Streaming Archive Library
38 (libarchive, -larchive)</p>
40 <p style="margin-top: 1em"><b>SYNOPSIS</b></p>
42 <p style="margin-left:6%;"><b>#include
43 <archive.h></b></p>
45 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
48 <p style="margin-left:12%;"><b>archive_write_get_bytes_per_block</b>(<i>struct archive *</i>);</p>
50 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
53 <p style="margin-left:12%;"><b>archive_write_set_bytes_per_block</b>(<i>struct archive *</i>,
54 <i>int bytes_per_block</i>);</p>
56 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
59 <p style="margin-left:12%;"><b>archive_write_get_bytes_in_last_block</b>(<i>struct archive *</i>);</p>
61 <p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
64 <p style="margin-left:12%;"><b>archive_write_set_bytes_in_last_block</b>(<i>struct archive *</i>,
67 <p style="margin-top: 1em"><b>DESCRIPTION <br>
68 archive_write_set_bytes_per_block</b>()</p>
70 <p style="margin-left:17%;">Sets the block size used for
71 writing the archive data. Every call to the write callback
72 function, except possibly the last one, will use this value
73 for the length. The default is to use a block size of 10240
74 bytes. Note that a block size of zero will suppress internal
75 blocking and cause writes to be sent directly to the write
76 callback as they occur.</p>
79 <p style="margin-top: 1em"><b>archive_write_get_bytes_per_block</b>()</p>
81 <p style="margin-left:17%;">Retrieve the block size to be
82 used for writing. A value of -1 here indicates that the
83 library should use default values. A value of zero indicates
84 that internal blocking is suppressed.</p>
87 <p style="margin-top: 1em"><b>archive_write_set_bytes_in_last_block</b>()</p>
89 <p style="margin-left:17%;">Sets the block size used for
90 writing the last block. If this value is zero, the last
91 block will be padded to the same size as the other blocks.
92 Otherwise, the final block will be padded to a multiple of
93 this size. In particular, setting it to 1 will cause the
94 final block to not be padded. For compressed output, any
95 padding generated by this option is applied only after the
96 compression. The uncompressed data is always unpadded. The
97 default is to pad the last block to the full block size
98 (note that <b>archive_write_open_filename</b>() will set
99 this based on the file type). Unlike the other
100 ’’set’’ functions, this function can
101 be called after the archive is opened.</p>
104 <p style="margin-top: 1em"><b>archive_write_get_bytes_in_last_block</b>()</p>
106 <p style="margin-left:17%;">Retrieve the currently-set
107 value for last block size. A value of -1 here indicates that
108 the library should use default values.</p>
110 <p style="margin-top: 1em"><b>RETURN VALUES</b></p>
113 <p style="margin-left:6%;"><b>archive_write_set_bytes_per_block</b>()
114 and <b>archive_write_set_bytes_in_last_block</b>() return
115 <b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
118 <p style="margin-left:6%; margin-top: 1em"><b>archive_write_get_bytes_per_block</b>()
119 and <b>archive_write_get_bytes_in_last_block</b>() return
120 currently configured block size (</p>
122 <p>-1 indicates the default block size ), or
123 <b>ARCHIVE_FATAL</b>.</p>
125 <p style="margin-top: 1em"><b>ERRORS</b></p>
127 <p style="margin-left:6%;">Detailed error codes and textual
128 descriptions are available from the <b>archive_errno</b>()
129 and <b>archive_error_string</b>() functions.</p>
131 <p style="margin-top: 1em"><b>SEE ALSO</b></p>
133 <p style="margin-left:6%;">tar(1), libarchive(3),
134 archive_write_set_options(3), cpio(5), mtree(5), tar(5)</p>
136 <p style="margin-left:6%; margin-top: 1em">BSD
137 February 2, 2012 BSD</p>