ARCHIVE_WRITE_BLOCKSIZE(3)
π ARCHIVE_WRITE_BLOCKSIZE(3) π
okay bestie, so this is a page from the Library Functions Manual β yes, the man page for ARCHIVE_WRITE_BLOCKSIZE(3), and she is serving libarchive realness. Let's get into it π«Ά
πΈ 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 a block size of 10240 bytes. Now listen β a block size of zero will suppress internal blocking and cause writes to be sent directly to the write callback as they occur. Zero is not playing around πarchive_write_get_bytes_per_block()β retrieves the block size to be used for writing. A value of -1 here means the library should use default values. A value of zero means internal blocking is suppressed. iykyk π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, periodt. The default is to pad the last block to the full block size (note thatarchive_write_open_filename()will set this based on the file type). And unlike the other βsetβ functions, this one can be called after the archive is opened. main character energy fr fr πarchive_write_get_bytes_in_last_block()β retrieves the currently-set value for last block size. A value of -1 here means 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 the currently configured block size (-1 indicates the default block size), or ARCHIVE_FATAL.
π ERRORS π
Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions. Go read them if something's giving unhinged, bestie.
π₯ SEE ALSO π₯
tar(1), archive_write_set_options(3), libarchive(3), cpio(5), mtree(5), tar(5)
and that's the whole page, no cap π this lil cutie came from Debian, dated February 2, 2012 β iconic behavior from 2012 honestly, she aged like fine wine π slay, go write some archives β¨π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2003-2011 Tim Kientzle
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms