archive_write_blocksize - archive_write_get_bytes_per_block, archive_write_set_bytes_per_block, archive_write_get_bytes_in_last_block, functions for creating archives
#include <archive.h> int archive_write_get_bytes_per_block(struct archive *); int archive_write_set_bytes_per_block(struct archive *, int bytes_per_block); int archive_write_get_bytes_in_last_block(struct archive *); int archive_write_set_bytes_in_last_block(struct archive *, int);
ARCHIVE_WRITE_BLOCKSIZE(3archive) NAME archive_write_get_bytes_per_block, archive_write_set_bytes_per_block, archive_write_get_bytes_in_last_block, archive_write_set_bytes_in_last_block - functions for creating archives LIBRARY Streaming Archive Library (libarchive, -larchive) SYNOPSIS #include <archive.h> int archive_write_get_bytes_per_block(struct archive *); int archive_write_set_bytes_per_block(struct archive *, int bytes_per_block); int archive_write_get_bytes_in_last_block(struct archive *); int archive_write_set_bytes_in_last_block(struct archive *, int); DESCRIPTION archive_write_set_bytes_per_block() 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. archive_write_get_bytes_per_block() Retrieve the block size to be used for writing. A value of -1 here indicates that the library should use default val- ues. A value of zero indicates that internal blocking is suppressed. archive_write_set_bytes_in_last_block() 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 archive_write_open_filename() will set this based on the file type). Unlike the other ``set'' functions, this func- tion can be called after the archive is opened. archive_write_get_bytes_in_last_block() Retrieve the currently-set value for last block size. A value of -1 here indicates that the library should use default values. RETURN VALUES archive_write_set_bytes_per_block() and archive_write_set_bytes_in_last_block() return ARCHIVE_OK on success, or ARCHIVE_FATAL. archive_write_get_bytes_per_block() and archive_write_get_bytes_in_last_block() return currently configured block size Po -1 indicates the default block size Pc, or ARCHIVE_FATAL. ERRORS Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions. ATTRIBUTES See attributes(7) for descriptions of the following attributes: +---------------+--------------------+ |ATTRIBUTE TYPE | ATTRIBUTE VALUE | +---------------+--------------------+ |Availability | library/libarchive | +---------------+--------------------+ |Stability | Uncommitted | +---------------+--------------------+ SEE ALSO tar(1), archive_write_set_options(3), libarchive(3), mtree(5) NOTES Source code for open source software components in Oracle Solaris can be found at https://www.oracle.com/downloads/opensource/solaris-source- code-downloads.html. This software was built from source available at https://github.com/oracle/solaris-userland. The original community source was downloaded from https://github.com/libarchive/libarchive/releases/down- load/v3.6.1/libarchive-3.6.1.tar.gz. Further information about this software can be found on the open source community website at http://www.libarchive.org/. February 2, 2012 ARCHIVE_WRITE_BLOCKSIZE(3archive)