ARCHIVE_WRITE_BLOCKSIZE(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– 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 that archive_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