Blame doc/text/archive_write_blocksize.3.txt

Packit Service 1d0348
ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual ARCHIVE_WRITE_BLOCKSI...
Packit Service 1d0348
Packit Service 1d0348
NAME
Packit Service 1d0348
     archive_write_get_bytes_per_block, archive_write_set_bytes_per_block,
Packit Service 1d0348
     archive_write_get_bytes_in_last_block,
Packit Service 1d0348
     archive_write_set_bytes_in_last_block — functions for creating archives
Packit Service 1d0348
Packit Service 1d0348
LIBRARY
Packit Service 1d0348
     Streaming Archive Library (libarchive, -larchive)
Packit Service 1d0348
Packit Service 1d0348
SYNOPSIS
Packit Service 1d0348
     #include <archive.h>
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_write_get_bytes_per_block(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_write_set_bytes_per_block(struct archive *, int bytes_per_block);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_write_get_bytes_in_last_block(struct archive *);
Packit Service 1d0348
Packit Service 1d0348
     int
Packit Service 1d0348
     archive_write_set_bytes_in_last_block(struct archive *, int);
Packit Service 1d0348
Packit Service 1d0348
DESCRIPTION
Packit Service 1d0348
     archive_write_set_bytes_per_block()
Packit Service 1d0348
	     Sets the block size used for writing the archive data.  Every
Packit Service 1d0348
	     call to the write callback function, except possibly the last
Packit Service 1d0348
	     one, will use this value for the length.  The default is to use a
Packit Service 1d0348
	     block size of 10240 bytes.  Note that a block size of zero will
Packit Service 1d0348
	     suppress internal blocking and cause writes to be sent directly
Packit Service 1d0348
	     to the write callback as they occur.
Packit Service 1d0348
Packit Service 1d0348
     archive_write_get_bytes_per_block()
Packit Service 1d0348
	     Retrieve the block size to be used for writing.  A value of -1
Packit Service 1d0348
	     here indicates that the library should use default values.  A
Packit Service 1d0348
	     value of zero indicates that internal blocking is suppressed.
Packit Service 1d0348
Packit Service 1d0348
     archive_write_set_bytes_in_last_block()
Packit Service 1d0348
	     Sets the block size used for writing the last block.  If this
Packit Service 1d0348
	     value is zero, the last block will be padded to the same size as
Packit Service 1d0348
	     the other blocks.	Otherwise, the final block will be padded to a
Packit Service 1d0348
	     multiple of this size.  In particular, setting it to 1 will cause
Packit Service 1d0348
	     the final block to not be padded.	For compressed output, any
Packit Service 1d0348
	     padding generated by this option is applied only after the com‐
Packit Service 1d0348
	     pression.	The uncompressed data is always unpadded.  The default
Packit Service 1d0348
	     is to pad the last block to the full block size (note that
Packit Service 1d0348
	     archive_write_open_filename() will set this based on the file
Packit Service 1d0348
	     type).  Unlike the other “set” functions, this function can be
Packit Service 1d0348
	     called after the archive is opened.
Packit Service 1d0348
Packit Service 1d0348
     archive_write_get_bytes_in_last_block()
Packit Service 1d0348
	     Retrieve the currently-set value for last block size.  A value of
Packit Service 1d0348
	     -1 here indicates that the library should use default values.
Packit Service 1d0348
Packit Service 1d0348
RETURN VALUES
Packit Service 1d0348
     archive_write_set_bytes_per_block() and
Packit Service 1d0348
     archive_write_set_bytes_in_last_block() return ARCHIVE_OK on success, or
Packit Service 1d0348
     ARCHIVE_FATAL.
Packit Service 1d0348
Packit Service 1d0348
     archive_write_get_bytes_per_block() and
Packit Service 1d0348
     archive_write_get_bytes_in_last_block() return currently configured block
Packit Service 1d0348
     size (-1 indicates the default block size), or ARCHIVE_FATAL.
Packit Service 1d0348
Packit Service 1d0348
ERRORS
Packit Service 1d0348
     Detailed error codes and textual descriptions are available from the
Packit Service 1d0348
     archive_errno() and archive_error_string() functions.
Packit Service 1d0348
Packit Service 1d0348
SEE ALSO
Packit Service 1d0348
     tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5),
Packit Service 1d0348
     tar(5)
Packit Service 1d0348
Packit Service 1d0348
BSD			       February 2, 2012 			   BSD