libzip

nih-at活跃维护

用 C 写的 zip 压缩包读写库,能创建、读取和修改 zip 归档,支持加密,适合嵌进自己的程序里处理压缩包。

A C library for reading, creating, and modifying zip archives.

v1.12.1发布于 2026-10-14 10:56 UTC1,060star +1 / 7 天372fork同步于 2026-11-10 05:56 UTC

怎么上手

README 里没有找到可直接复制的安装命令

README 里没有找到可直接复制的安装命令,请到 README 或官方文档查看安装方式。

硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本v1.12.1
  1. v1.12.1libzip 1.12.1最新正式版2026-10-14 · 2026-10-14 10:56 UTC
    • Protect against denial of service attack (advisory GHSA-m3wq-j48p-jxwh, actually fixed in 1.12).
    • Fix compile issues.
    • Fix adding and replacing files in torrentzip archives.
    • Fix error handling in zip_source_filep_create().
  2. v1.12libzip 1.122026-10-07 · 2026-10-07 14:21 UTC
    查看更新说明
    • Keep order of local extra fields, even if an identical extra field is present in the central directory.
    • Add zip_source_at_eof() and ZIP_SOURCE_AT_EOF.
    • Consistently report CRC and decryption errors when reading exactly to end-of-file.
    • Remove Mbed TLS support - the required functions were made private.
    • Make non-random tests work on macOS and Windows by using a special version of libzip.
    • Securely clear passwords and key material before freeing it.
    • Use SipHash hash function with per-table random keys. This prevents hash flooding attacks.
    • Add compile time option to limit LZMA window size.
    • Add more comprehensive fuzzers for metadata and write code paths.
    • Fix zip_source_is_seekable().
    • Fix setting incorrect WinZIP AES version in some cases.
    • Further improvements to overall stability and other minor adjustments have been made.
  3. v1.11.4libzip 1.11.42025-05-23 · 2025-05-23 14:02 UTC
    查看更新说明
    • Use separate cmake package files for library and programs.
    • Improve documentation.
  4. v1.11.3libzip 1.11.32025-01-20 · 2025-01-20 11:03 UTC
    查看更新说明
    • Report read error for corrupted encrypted file data.
    • Avoid unnecessary seeks when writing archive.
    • Don't hardcode _Nullable support in zip.h to allow it to be used with different compilers.
    • Improve check for GetSecurityInformation availability on Windows.
  5. v1.11.2libzip 1.11.22024-10-31 · 2024-10-31 22:33 UTC
    查看更新说明
    • Fix performance regression in zip_stat introduced in 1.11.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    libzip

    A C Library for Reading, Creating, and Modifying Zip Archives

    Why Use libzip?

    libzip has been continuously developed since 2005. It is efficient, small, and flexible. It is usable on Linux, macOS, and Windows and many other operating systems.

    The main design criteria are:

    • Maintain a stable API without breaking backwards compatibility.
    • Do not create corrupt files, even in case of errors.
    • Do not delete data.
    • Be efficient.

    It supports the following features:

    • Reading archives and file data from files or memory buffers
    • Reverting unsaved changes
    • Zip64 large archives
    • Deflate, bzip2, LZMA, and zstd compression
    • Winzip AES and legacy PKWARE encryption

    The BSD license used for libzip allows its use in commercial products.

    Who Uses libzip?

    libzip is used in major open source projects like KDE, Chromium, ImageMagick, and VeraCrypt.

    Commercial products using libzip include Lightroom from Adobe and the Kobo eReader.

    There are also bindings for other programming languages: Python, Ruby, Lua, PHP, and others.

    There is a more complete list of projects.

    Getting Started

    Most Linux and other Unix distributions include libzip in their package distributions, it is usually called libzip or libzip-dev.

    On macOS, it is included in both Homebrew and Mac Ports.

    On Windows, it is in vcpkg.

    A list of available packages can be found on Repology.

    For building and installing libzip from source, see the INSTALL.md file.

    Using libzip

    libzip is fully documented via man pages. HTML versions of the man pages are on libzip.org and in the man directory. You can start with libzip(3), which lists all others. Example source code is in the examples and src subdirectories.

    If you have developed an application using libzip, you can find out about API changes and how to adapt your code for them in the included file API-CHANGES.md.

    Staying in Touch

    More information and the latest version can always be found on libzip.org. The official repository is at GitHub.

    If you want to contribute to libzip, please read the contributing and coding guidelines first.

    If you want to reach the authors in private, use [email protected].

    Packaging status

    Github Actions Build Status Appveyor Build status Coverity Status Fuzzing Status