LIBARCHIVE_CHANGES(3)
π NAME π
libarchive_changes β the tea on what changed in the libarchive interface, bestie π
β¨ CHANGES IN LIBARCHIVE 3 β¨
okay so this page is literally the glow-up recap: it walks through the user-visible changes in libarchive3, and lists the public functions and other symbols that got changed, deprecated, or straight-up removed in libarchive3 β plus their replacements if any exist π«Ά
π¦ Multiple Filters π¦
back in Libarchive2 you got one single filter (input or output) active on an archive. periodt. one. Libarchive3 said "not anymore bestie" and extended this into a variable-length stack β¨
so where archive_write_set_compression_XXX() would replace any existing filter, archive_write_add_filter_XXX() instead extends the write pipeline with another filter. stacking filters like it's a fit check π
πΈ Character Set Handling πΈ
Libarchive2 just assumed the local platform uses Unicode as the native wchar_t encoding. which is true on Windows, modern Linux, and a few other systems β but is certainly not universal π as a result, pax format archives were written incorrectly on some systems, since pax format requires UTF-8 and libarchive 2 incorrectly assumed that wchar_t strings can be easily converted to UTF-8. not the vibe.
Libarchive3 uses the standard iconv library to convert between character sets, and is introducing the notion of a βdefault character set for the archiveβ π
to support this, archive_entry objects can now be bound to a particular archive when they are created. the automatic character set conversions performed by archive_entry objects when reading and writing filenames, usernames, and other strings will now use an appropriate default character set:
- if the
archive_entryobject is bound to an archive, it will use the default character set for that archive π - the platform default character encoding (as returned by
nl_langinfo(CHARSET)) will be used if nothing else is specified π
Libarchive3 also introduces charset options to many of the archive readers and writers, so you can control the character set that will be used for filenames written in those archives. when possible, this will be set automatically based on information in the archive itself β¨ combining this with the notion of a default character set for the archive should allow you to configure libarchive to read archives from other platforms and have the filenames and other information transparently converted to the character encoding suitable for your application. slay π
π Prototype Changes π
heads up bestie, these changes break binary compatibility β libarchive3 has a new shared library version to reflect these changes. the library now uses portable wide types such as int64_t instead of less-portable types such as off_t, gid_t, uid_t, and ino_t π³
there are a few cases where these changes will affect your source code:
- in some cases, libarchive's wider types will introduce the possibility of truncation: for example, on a system with a 16-bit
uid_t, you risk having uid65536be truncated to uid0, which can cause serious security problems. no cap, be careful π - Typedef function pointer types will be incompatible. for example, if you define custom skip callbacks, you may have to use code similar to the following if you want to support building against libarchive2 and libarchive3:
#if ARCHIVE_VERSION_NUMBER < 3000000
typedef off_t myoff_t;
#else
typedef int64_t myoff_t;
#endif
myoff_t
my_skip_function(struct archive *a, void *v, myoff_t o)
{
... implementation ...
}
π₯ Affected functions π₯
archive_entry_gid(),archive_entry_set_gid()archive_entry_uid(),archive_entry_set_uid()archive_entry_ino(),archive_entry_set_ino()archive_read_data_block(),archive_write_data_block()archive_read_disk_gname(),archive_read_disk_uname()archive_read_disk_set_gname_lookup(),archive_read_disk_set_group_lookup(),archive_read_disk_set_uname_lookup(),archive_read_disk_set_user_lookup()archive_skip_callback()archive_read_extract_set_skip_file(),archive_write_disk_set_skip_file(),archive_write_set_skip_file()archive_write_disk_set_group_lookup(),archive_write_disk_set_user_lookup()
where these functions or their arguments took or returned gid_t, ino_t, off_t, or uid_t they now take or return int64_t or equivalent. glow-up complete π
π§ Deprecated Symbols π§
symbols deprecated in libarchive3 will be removed in libarchive4 β so like, they're on borrowed time, bestie π these symbols, along with their replacements if any, are listed below:
archive_position_compressed(),archive_position_uncompressed()βarchive_filter_bytes()archive_compression()βarchive_filter_code()archive_compression_name()βarchive_filter_name()archive_read_finish(),archive_write_finish()βarchive_read_free(),archive_write_free()archive_read_open_file(),archive_write_open_file()βarchive_read_open_filename(),archive_write_open_filename()archive_read_support_compression_all()βarchive_read_support_filter_all()archive_read_support_compression_bzip2()βarchive_read_support_filter_bzip2()archive_read_support_compression_compress()βarchive_read_support_filter_compress()archive_read_support_compression_gzip()βarchive_read_support_filter_gzip()archive_read_support_compression_lzip()βarchive_read_support_filter_lzip()archive_read_support_compression_lzma()βarchive_read_support_filter_lzma()archive_read_support_compression_none()βarchive_read_support_filter_none()archive_read_support_compression_program()βarchive_read_support_filter_program()archive_read_support_compression_program_signature()βarchive_read_support_filter_program_signature()archive_read_support_compression_rpm()βarchive_read_support_filter_rpm()archive_read_support_compression_uu()βarchive_read_support_filter_uu()archive_read_support_compression_xz()βarchive_read_support_filter_xz()archive_write_set_compression_bzip2()βarchive_write_add_filter_bzip2()archive_write_set_compression_compress()βarchive_write_add_filter_compress()archive_write_set_compression_gzip()βarchive_write_add_filter_gzip()archive_write_set_compression_lzip()βarchive_write_add_filter_lzip()archive_write_set_compression_lzma()βarchive_write_add_filter_lzma()archive_write_set_compression_none()βarchive_write_add_filter_none()archive_write_set_compression_program()βarchive_write_add_filter_program()archive_write_set_compression_filter()βarchive_write_add_filter_filter()
β Removed Symbols β
these symbols, listed below along with their replacements if any, were deprecated in libarchive2, and are not part of libarchive3. gone. deleted. it's giving "we don't know her" π
archive_api_feature()βarchive_version_number()archive_api_version()βarchive_version_number()archive_version()βarchive_version_string()archive_version_stamp()βarchive_version_number()archive_read_set_filter_options()βarchive_read_set_options()orarchive_read_set_filter_option()archive_read_set_format_options()βarchive_read_set_options()orarchive_read_set_format_option()archive_write_set_filter_options()βarchive_write_set_options()orarchive_write_set_filter_option()archive_write_set_format_options()βarchive_write_set_options()orarchive_write_set_format_option()ARCHIVE_API_FEATUREβARCHIVE_VERSION_NUMBERARCHIVE_API_VERSIONβARCHIVE_VERSION_NUMBERARCHIVE_VERSION_STAMPβARCHIVE_VERSION_NUMBERARCHIVE_LIBRARY_VERSIONβARCHIVE_VERSION_STRINGARCHIVE_COMPRESSION_NONEβARCHIVE_FILTER_NONEARCHIVE_COMPRESSION_GZIPβARCHIVE_FILTER_GZIPARCHIVE_COMPRESSION_BZIP2βARCHIVE_FILTER_BZIP2ARCHIVE_COMPRESSION_COMPRESSβARCHIVE_FILTER_COMPRESSARCHIVE_COMPRESSION_PROGRAMβARCHIVE_FILTER_PROGRAMARCHIVE_COMPRESSION_LZMAβARCHIVE_FILTER_LZMAARCHIVE_COMPRESSION_XZβARCHIVE_FILTER_XZARCHIVE_COMPRESSION_UUβARCHIVE_FILTER_UUARCHIVE_COMPRESSION_RPMβARCHIVE_FILTER_RPMARCHIVE_COMPRESSION_LZIPβARCHIVE_FILTER_LZIPARCHIVE_BYTES_PER_RECORDβ512ARCHIVE_DEFAULT_BYTES_PER_BLOCKβ10240
π SEE ALSO π
go read these next bestie, they're iconic:
archive_read(3), archive_read_filter(3), archive_read_format(3), archive_read_set_options(3), archive_util(3), archive_write(3), archive_write_filter(3), archive_write_format(3), archive_write_set_options(3), libarchive(3)
and that's the whole page, babe π«Ά this was the Library Functions Manual version of LIBARCHIVE_CHANGES, served up by Debian and dated December 23, 2011 β yes she's vintage, and yes she still ate π
β¨
π¦ where this page comes from
- alpine 3.22: libarchive-doc 3.8.10-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.22: libarchive-doc 3.8.11-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.23: libarchive-doc 3.8.10-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.23: libarchive-doc 3.8.11-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.24: libarchive-doc 3.8.10-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- alpine 3.24: libarchive-doc 3.8.11-r0 Β· BSD-2-Clause AND BSD-3-Clause AND Public-Domain
- arch rolling: libarchive 3.8.10-1
- arch rolling: libarchive 3.8.11-1 Β· BSD-2-Clause AND BSD-4-Clause-UC AND Apache-2.0 OR CC0-1.0 OR OpenSSL
- arch rolling: libarchive 3.8.9-1
- centos-stream 10: libarchive-devel 3.7.7-11.el10 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- debian trixie: libarchive-dev 3.7.4-4+deb13u1 Β· BSD-2-Clause
- fedora 43: libarchive-devel 3.8.1-3.fc43 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 43: libarchive-devel 3.8.1-3.fc43 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 43: libarchive-devel 3.8.4-1.fc43 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 43: libarchive-devel 3.8.4-1.fc43 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 44: libarchive-devel 3.8.4-2.fc44 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 44: libarchive-devel 3.8.4-2.fc44 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 44: libarchive-devel 3.8.7-1.fc44 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- fedora 44: libarchive-devel 3.8.7-1.fc44 Β· BSD-2-Clause AND FSFULLR AND GPL-2.0-or-later WITH Libtool-exception AND BSD-3-Clause AND FSFUL
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixos 26.05: libarchive 3.8.9
- nixpkgs unstable: libarchive 3.8.9
- opensuse-leap 16.0: libarchive-devel 3.8.1-160000.4.1 Β· BSD-2-Clause
- opensuse-leap 16.0: libarchive-devel 3.8.1-160000.4.1 Β· BSD-2-Clause
- opensuse-leap 16.0: libarchive-devel 3.8.1-160000.4.1 Β· BSD-2-Clause
- opensuse-leap 16.0: libarchive-devel 3.8.1-160000.4.1 Β· BSD-2-Clause
- ubuntu questing: libarchive-dev 3.7.7-0ubuntu3
- ubuntu questing: libarchive-dev 3.7.7-0ubuntu3.2
- ubuntu resolute: libarchive-dev 3.8.5-1ubuntu2 Β· BSD-2-Clause
- ubuntu resolute: libarchive-dev 3.8.5-1ubuntu2.3 Β· BSD-2-Clause
- ubuntu stonking: libarchive-dev 3.8.9-1 Β· BSD-2-Clause
- Copyright (c) 2011 Tim Kientzle
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms