Generated by GPT-5-mini| libarchive | |
|---|---|
| Name | libarchive |
| Title | libarchive |
| Developer | FreeBSD Project |
| Released | 2003 |
| Operating system | Cross-platform |
| Genre | Compression library |
| License | BSD-like |
libarchive is a C library providing routines to read and write streaming archive formats and to compress and decompress data. It is maintained by contributors associated with FreeBSD, OpenBSD, and other BSD operating system projects and is used by tools originating from NetBSD and Illumos. The project interacts with software ecosystems such as GNU Project utilities, Debian, Red Hat Enterprise Linux, and cloud platforms including Amazon Web Services and Google Cloud Platform.
libarchive originated in the early 2000s during development work on FreeBSD and contributions from developers who previously worked on NetBSD and OpenBSD. Early milestones intersected with releases of FreeBSD 6 and integration into ports collections managed by pkgsrc and FreeBSD Ports Collection. The project evolved alongside compression libraries like zlib and bzip2 and archiving tools such as tar and cpio, with maintainers coordinating through repositories hosted by organizations like GitHub and discussions on lists affiliated with the Free Software Foundation. Over time libarchive incorporated support for formats popularized by vendors such as Microsoft and standards bodies including POSIX.
The library exposes a streaming architecture that separates archive format handling from compression backends, influenced by designs used in tar implementations and compression frameworks like zlib and xz-utils. It provides an abstraction for archive entries, metadata, and data streams that integrates with system interfaces from POSIX and file system implementations used in Linux kernel distributions and FreeBSD releases. Components interact with event-driven I/O models and system call semantics present in glibc and musl-based systems, and the codebase employs portability layers used by projects hosted on GitHub and mirrored on OpenBSD CVS-style repositories. The modular architecture allows addition of filters and readers/writers for formats championed by organizations like 7-Zip and standards committees such as IETF working groups.
libarchive supports archive formats commonly encountered in ecosystems managed by Debian, Ubuntu, Red Hat Enterprise Linux, and macOS distributions, and recognizes legacy formats used in installations from Solaris and AIX. Supported compression formats include implementations analogous to zlib, bzip2, gzip-style streams, and XZ Utils-compatible filters. The library is portable across operating systems including Linux kernel-based distributions, FreeBSD, OpenBSD, NetBSD, and macOS and is packaged in distributions maintained by Fedora Project and Arch Linux. Platform integrations reflect compatibility with toolchains from GCC and Clang and build systems like CMake and GNU Autotools.
The C API provides functions for reading, writing, and iterating archive entries, modeled to interoperate with conventions from POSIX and runtime environments used by systemd and launchd. Bindings and wrappers exist for languages commonly adopted in projects at Apache Software Foundation and Mozilla Foundation ecosystems, with community-maintained adapters for Python (programming language), Ruby (programming language), Perl and Go (programming language). Package managers such as PyPI, RubyGems, and system-level packaging maintained by Debian and FreeBSD Ports distribute language bindings so that applications developed for platforms like Kubernetes and Docker can embed archive handling without invoking external utilities like tar.
Security assessments have examined libarchive for issues analogous to vulnerabilities reported in widely used libraries maintained by entities like OpenSSL and libpng. Vulnerability disclosures have been coordinated through advisories posted by distributions such as Debian Security and Red Hat Security Response Team, and fixes have been merged via pull requests on management platforms such as GitHub following responsible disclosure practices championed by organizations like CERT Coordination Center. Hardening measures reference mitigations used in projects overseen by LLVM and runtime safeguards employed by AppArmor and SELinux-enabled deployments.
The codebase is distributed under a permissive BSD-style license compatible with licensing norms enforced by the Free Software Foundation and corporate distributions maintained by Canonical (company) and Red Hat. This licensing model facilitates inclusion in commercial products from vendors such as Apple Inc. and IBM and integration into community-driven distributions like Debian and Fedora Project. Packaging is maintained in repositories like the FreeBSD Ports Collection and distributed via binary package systems used by Homebrew (package manager) and pkgsrc.
libarchive is embedded in system utilities and user-facing tools developed by projects such as FreeBSD, OpenBSD, and NetBSD; it is also leveraged by application ecosystems managed by Canonical (company) for Ubuntu snaps and by cloud vendors like Amazon Web Services for image manipulation. Software projects including CMake, backup solutions aligned with Bacula, and virtualization platforms related to QEMU and KVM have integrated the library to handle archive operations. Distributions and package builders used by Debian and Arch Linux incorporate libarchive for archive manipulation in installation and deployment workflows.
Category:Compression software Category:Free software programmed in C