Blame doc/man/archive_write_blocksize.3

Packit Service 1d0348
.TH ARCHIVE_WRITE_BLOCKSIZE 3 "February 2, 2012" ""
Packit Service 1d0348
.SH NAME
Packit Service 1d0348
.ad l
Packit Service 1d0348
\fB\%archive_write_get_bytes_per_block\fP,
Packit Service 1d0348
\fB\%archive_write_set_bytes_per_block\fP,
Packit Service 1d0348
\fB\%archive_write_get_bytes_in_last_block\fP,
Packit Service 1d0348
\fB\%archive_write_set_bytes_in_last_block\fP
Packit Service 1d0348
\- functions for creating archives
Packit Service 1d0348
.SH LIBRARY
Packit Service 1d0348
.ad l
Packit Service 1d0348
Streaming Archive Library (libarchive, -larchive)
Packit Service 1d0348
.SH SYNOPSIS
Packit Service 1d0348
.ad l
Packit Service 1d0348
\fB#include <archive.h>\fP
Packit Service 1d0348
.br
Packit Service 1d0348
\fIint\fP
Packit Service 1d0348
.br
Packit Service 1d0348
\fB\%archive_write_get_bytes_per_block\fP(\fI\%struct\ archive\ *\fP);
Packit Service 1d0348
.br
Packit Service 1d0348
\fIint\fP
Packit Service 1d0348
.br
Packit Service 1d0348
\fB\%archive_write_set_bytes_per_block\fP(\fI\%struct\ archive\ *\fP, \fI\%int\ bytes_per_block\fP);
Packit Service 1d0348
.br
Packit Service 1d0348
\fIint\fP
Packit Service 1d0348
.br
Packit Service 1d0348
\fB\%archive_write_get_bytes_in_last_block\fP(\fI\%struct\ archive\ *\fP);
Packit Service 1d0348
.br
Packit Service 1d0348
\fIint\fP
Packit Service 1d0348
.br
Packit Service 1d0348
\fB\%archive_write_set_bytes_in_last_block\fP(\fI\%struct\ archive\ *\fP, \fI\%int\fP);
Packit Service 1d0348
.SH DESCRIPTION
Packit Service 1d0348
.ad l
Packit Service 1d0348
.RS 5
Packit Service 1d0348
.TP
Packit Service 1d0348
\fB\%archive_write_set_bytes_per_block\fP()
Packit Service 1d0348
Sets the block size used for writing the archive data.
Packit Service 1d0348
Every call to the write callback function, except possibly the last one, will
Packit Service 1d0348
use this value for the length.
Packit Service 1d0348
The default is to use a block size of 10240 bytes.
Packit Service 1d0348
Note that a block size of zero will suppress internal blocking
Packit Service 1d0348
and cause writes to be sent directly to the write callback as they occur.
Packit Service 1d0348
.TP
Packit Service 1d0348
\fB\%archive_write_get_bytes_per_block\fP()
Packit Service 1d0348
Retrieve the block size to be used for writing.
Packit Service 1d0348
A value of -1 here indicates that the library should use default values.
Packit Service 1d0348
A value of zero indicates that internal blocking is suppressed.
Packit Service 1d0348
.TP
Packit Service 1d0348
\fB\%archive_write_set_bytes_in_last_block\fP()
Packit Service 1d0348
Sets the block size used for writing the last block.
Packit Service 1d0348
If this value is zero, the last block will be padded to the same size
Packit Service 1d0348
as the other blocks.
Packit Service 1d0348
Otherwise, the final block will be padded to a multiple of this size.
Packit Service 1d0348
In particular, setting it to 1 will cause the final block to not be padded.
Packit Service 1d0348
For compressed output, any padding generated by this option
Packit Service 1d0348
is applied only after the compression.
Packit Service 1d0348
The uncompressed data is always unpadded.
Packit Service 1d0348
The default is to pad the last block to the full block size (note that
Packit Service 1d0348
\fB\%archive_write_open_filename\fP()
Packit Service 1d0348
will set this based on the file type).
Packit Service 1d0348
Unlike the other
Packit Service 1d0348
``set''
Packit Service 1d0348
functions, this function can be called after the archive is opened.
Packit Service 1d0348
.TP
Packit Service 1d0348
\fB\%archive_write_get_bytes_in_last_block\fP()
Packit Service 1d0348
Retrieve the currently-set value for last block size.
Packit Service 1d0348
A value of -1 here indicates that the library should use default values.
Packit Service 1d0348
.RE
Packit Service 1d0348
.SH RETURN VALUES
Packit Service 1d0348
.ad l
Packit Service 1d0348
\fB\%archive_write_set_bytes_per_block\fP()
Packit Service 1d0348
and
Packit Service 1d0348
\fB\%archive_write_set_bytes_in_last_block\fP()
Packit Service 1d0348
return
Packit Service 1d0348
\fBARCHIVE_OK\fP
Packit Service 1d0348
on success, or
Packit Service 1d0348
\fBARCHIVE_FATAL\fP.
Packit Service 1d0348
.PP
Packit Service 1d0348
\fB\%archive_write_get_bytes_per_block\fP()
Packit Service 1d0348
and
Packit Service 1d0348
\fB\%archive_write_get_bytes_in_last_block\fP()
Packit Service 1d0348
return currently configured block size
Packit Service 1d0348
Po
Packit Service 1d0348
.RS 4
Packit Service 1d0348
-1
Packit Service 1d0348
.RE
Packit Service 1d0348
indicates the default block size
Packit Service 1d0348
Pc,
Packit Service 1d0348
or
Packit Service 1d0348
\fBARCHIVE_FATAL\fP.
Packit Service 1d0348
.SH ERRORS
Packit Service 1d0348
.ad l
Packit Service 1d0348
Detailed error codes and textual descriptions are available from the
Packit Service 1d0348
\fB\%archive_errno\fP()
Packit Service 1d0348
and
Packit Service 1d0348
\fB\%archive_error_string\fP()
Packit Service 1d0348
functions.
Packit Service 1d0348
.SH SEE ALSO
Packit Service 1d0348
.ad l
Packit Service 1d0348
\fBtar\fP(1),
Packit Service 1d0348
\fBlibarchive\fP(3),
Packit Service 1d0348
\fBarchive_write_set_options\fP(3),
Packit Service 1d0348
\fBcpio\fP(5),
Packit Service 1d0348
\fBmtree\fP(5),
Packit Service 1d0348
\fBtar\fP(5)