summaryrefslogtreecommitdiff
path: root/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html
blob: c0bff2168786865bb58a7b0f121adaa2d3710061 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Wed Jun 12 21:10:17 2019 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<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 }
</style>
<title></title>
</head>
<body>

<hr>


<p>ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual
ARCHIVE_WRITE_BLOCKSI...</p>

<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_per_block</b>,
<b>archive_write_get_bytes_in_last_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
&lt;archive.h&gt;</b></p>

<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>,
<i>int&nbsp;bytes_per_block</i>);</p>

<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>,
<i>int</i>);</p>

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

<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
&ldquo;set&rdquo; 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
<b>ARCHIVE_FATAL</b>.</p>

<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>
<hr>
</body>
</html>