ARCHIVE_READ_FILTER(3)
π¦ ARCHIVE_READ_FILTER(3) β functions for reading streaming archives π¦
okay bestie, welcome to ARCHIVE_READ_FILTER(3) from the Library Functions Manual. This is the filter-support corner of libarchive, and it's honestly giving "let me sniff out the compression before we unpack anything" π
.
πΈ NAME πΈ
archive_read_support_filter_all, archive_read_support_filter_bzip2, archive_read_support_filter_compress, archive_read_support_filter_gzip, archive_read_support_filter_lz4, archive_read_support_filter_lzma, archive_read_support_filter_none, archive_read_support_filter_rpm, archive_read_support_filter_uu, archive_read_support_filter_xz, archive_read_support_filter_zstd, archive_read_support_filter_program, and archive_read_support_filter_program_signature β these are the functions for reading streaming archives. β¨
And yes, the SYNOPSIS below has even more filter pals popping out; keep scrolling, bestie π«Ά.
π LIBRARY π
Streaming Archive Library (libarchive, -larchive). Link it and go, periodt.
β¨ SYNOPSIS β¨
#include <archive.h>
int
archive_read_support_filter_all(struct archive *);
int
archive_read_support_filter_by_code(struct archive *, int);
int
archive_read_support_filter_bzip2(struct archive *);
int
archive_read_support_filter_compress(struct archive *);
int
archive_read_support_filter_grzip(struct archive *);
int
archive_read_support_filter_gzip(struct archive *);
int
archive_read_support_filter_lrzip(struct archive *);
int
archive_read_support_filter_lz4(struct archive *);
int
archive_read_support_filter_lzma(struct archive *);
int
archive_read_support_filter_lzop(struct archive *);
int
archive_read_support_filter_none(struct archive *);
int
archive_read_support_filter_rpm(struct archive *);
int
archive_read_support_filter_uu(struct archive *);
int
archive_read_support_filter_xz(struct archive *);
int
archive_read_support_filter_zstd(struct archive *);
int
archive_read_support_filter_program(struct archive *, const char *cmd);
int
archive_read_support_filter_program_signature(struct archive *,
const char *cmd, const void *signature, size_t signature_length);
π DESCRIPTION π
okay so here's the tea, bestie: these functions set up filters for reading streaming archives. The vibe check is all about enabling detection and decompression support.
archive_read_support_filter_bzip2(),archive_read_support_filter_compress(),archive_read_support_filter_grzip(),archive_read_support_filter_gzip(),archive_read_support_filter_lrzip(),archive_read_support_filter_lz4(),archive_read_support_filter_lzma(),archive_read_support_filter_lzop(),archive_read_support_filter_none(),archive_read_support_filter_rpm(),archive_read_support_filter_uu(),archive_read_support_filter_xz(),archive_read_support_filter_zstd()β these enable auto-detection code and decompression support for the specified compression. They may fall back on external programs if an appropriate library was not available at build time. Decompression using an external program is usually slower than decompression through built-in libraries. And note:noneis always enabled by default. πarchive_read_support_filter_all()β enables all available decompression filters. Slay, it's literally all of them.archive_read_support_filter_by_code()β enables a single filter specified by the filter code. This function does not work withARCHIVE_FILTER_PROGRAM. Note: in statically-linked executables, this will cause your program to include support for every filter. If executable size is a concern, you may wish to avoid using this function. π«Άarchive_read_support_filter_program()β data is fed through the specified external program before being dearchived. Note that this disables automatic detection of the compression format, so it makes no sense to specify this in conjunction with any other decompression option. π¨archive_read_support_filter_program_signature()β this feeds data through the specified external program but only if the initial bytes of the data match the specified signature value. Cute and picky, iykyk.
π RETURN VALUES π
These functions return ARCHIVE_OK if the compression is fully supported, and ARCHIVE_WARN if the compression is supported only through an external program.
Also: archive_read_support_filter_none() always succeeds β no cap, it's that girl. π
π ERRORS π
Detailed error codes and textual descriptions are available from the archive_errno() and archive_error_string() functions. Use them, bestie π.
π§ SEE ALSO π§
archive_read(3)archive_read_data(3)archive_read_format(3)archive_read_format(3)β yes, it's listed twice, that's the lore πlibarchive(3)
π Debian β’ June 9, 2020 β’ ARCHIVE_READ_FILTER(3) β mwah, go read some archives bestie π
π¦ where this page comes from
- 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
- 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
- Copyright (c) 2003-2011 Tim Kientzle
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms