Blame doc/text/archive_write_blocksize.3.txt

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