# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, apt, zypper 安装 libdeflate

查看 libdeflate 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:libdeflate
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libdeflate
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libdeflate
```

  证据: MacPorts ports tree: archivers/libdeflate/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libdeflate
```

  证据: Alpine Linux edge package indexes: libdeflate from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install libdeflate
```

  证据: Fedora Rawhide package metadata: libdeflate from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#libdeflate
```

  证据: nixpkgs package indexes: pkgs/by-name/li/libdeflate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S libdeflate
```

  证据: Arch Linux sync databases: libdeflate from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install libdeflate-dev
```

  证据: Debian stable package indexes: libdeflate-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- zypper (92%):

```sh
sudo zypper install libdeflate-devel
```

  证据: openSUSE Tumbleweed package metadata: libdeflate-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:libdeflate
- **软件包管理器:** Homebrew
- **版本:** 1.25
- **来源摘要:** Heavily optimized DEFLATE/zlib/gzip compression and decompression
- **主页:** <https://github.com/ebiggers/libdeflate>
- **仓库:** <https://github.com/ebiggers/libdeflate>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- libdeflate-gunzip (别名)
- libdeflate-gzip (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.25
## 项目历史与用法

libdeflate is Eric Biggers' optimized C library for whole-buffer DEFLATE, zlib, and gzip compression and decompression. It is intentionally not a streaming zlib clone; it trades API compatibility for speed, compactness, and easy embedding.

### 项目历史

The README presents libdeflate as a fast whole-buffer compression library supporting raw DEFLATE, zlib-wrapped DEFLATE, and gzip-wrapped DEFLATE. It includes library APIs plus libdeflate-gzip/libdeflate-gunzip convenience programs, benchmarks, and checksum tools.

The NEWS file starts with version 0.1 as the initial official release, then records a steady sequence of compression-ratio, checksum, architecture, build, and portability improvements. Notable milestones include MIT relicensing by 0.5, CMake and compiler support work, custom allocator APIs in 1.19, RISC-V basics and new checksum acceleration in 1.20, and relocatable CMake package work in 1.25.

### 采用历史

libdeflate became attractive anywhere software needed faster in-memory DEFLATE-family compression than zlib-style streaming APIs. The README explicitly supports direct source integration and documents language bindings, helping it spread into applications, libraries, and package managers as a performance-oriented dependency.

### 使用方式

Developers use libdeflate when the compressed or decompressed data fits in memory and whole-buffer APIs are acceptable. The libdeflate-gzip tool can substitute for standard gzip in some cases, but upstream warns it is a convenience program with limitations rather than the main use case.

### 为什么软件包爱好者会关心

libdeflate is a modern compression-library package with exactly the kind of constraints packagers care about: stable C APIs, CPU-specific optimized code selected at runtime, direct embedding support, CMake/pkg-config integration, and a non-zlib-compatible API that prevents accidental semantic confusion.

### 时间线

- 2016: The author publicly announced libdeflate as a new optimized DEFLATE implementation.
- 2017: Version 0.1 was the initial official release according to upstream NEWS.
- 2018: Version 1.0-era Windows binary and API usage surfaced in upstream issue and release workflows.
- 2023: Version 1.19 added custom allocator APIs and compatibility fixes for DEFLATE streams created by libdeflate.
- 2024: Version 1.20 added VPCLMULQDQ/VNNI checksum acceleration and basic RISC-V optimizations.
- 2026: Version 1.25 fixed a GCC 16 build error and made the CMake package relocatable.

### Related projects

- zlib, gzip, and raw DEFLATE are the formats and incumbent ecosystem around libdeflate. Language bindings and bundled integrations use libdeflate when whole-buffer compression is a better fit than streaming APIs.

### 来源

- <https://encode.su/threads/2482-libdeflate-a-new-optimized-DEFLATE-implementation>
- <https://github.com/ebiggers/libdeflate>
- <https://github.com/ebiggers/libdeflate/releases>
- <https://raw.githubusercontent.com/ebiggers/libdeflate/master/NEWS.md>
- <https://raw.githubusercontent.com/ebiggers/libdeflate/master/README.md>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

## 其他软件包管理器记录

- Debian apt - libdeflate-dev - 1.23-2: normalized package name match | Debian stable package indexes: libdeflate-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | headers for whole-buffer compression and decompression library | https://github.com/ebiggers/libdeflate
- Debian apt - libdeflate-tools - 1.23-2: normalized package name match | Debian stable package indexes: libdeflate-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | tools for whole-buffer compression and decompression library | https://github.com/ebiggers/libdeflate
- Debian apt - libdeflate0 - 1.23-2: normalized package name match | Debian stable package indexes: libdeflate0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | fast, whole-buffer DEFLATE-based compression and decompression | https://github.com/ebiggers/libdeflate
- Nix - libdeflate: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libdeflate/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libdeflate-dev - 1.19-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libdeflate-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | headers for whole-buffer compression and decompression library | https://github.com/ebiggers/libdeflate
- Ubuntu apt - libdeflate-tools - 1.19-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libdeflate-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | tools for whole-buffer compression and decompression library | https://github.com/ebiggers/libdeflate
- Ubuntu apt - libdeflate0 - 1.19-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libdeflate0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | fast, whole-buffer DEFLATE-based compression and decompression | https://github.com/ebiggers/libdeflate
- apk - libdeflate - 1.25-r0: normalized package name match | Alpine Linux edge package indexes: libdeflate from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library for fast, whole-buffer DEFLATE-based compression and decompression | https://github.com/ebiggers/libdeflate
- apk - libdeflate-dev - 1.25-r0: normalized package name match | Alpine Linux edge package indexes: libdeflate-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library for fast, whole-buffer DEFLATE-based compression and decompression (development files) | https://github.com/ebiggers/libdeflate
- apk - libdeflate-static - 1.25-r0: normalized package name match | Alpine Linux edge package indexes: libdeflate-static from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library for fast, whole-buffer DEFLATE-based compression and decompression (static library) | https://github.com/ebiggers/libdeflate
- apk - libdeflate-utils - 1.25-r0: normalized package name match | Alpine Linux edge package indexes: libdeflate-utils from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Command line utilities for the DEFLATE library | https://github.com/ebiggers/libdeflate
- dnf - libdeflate - 1.25-5.fc45: normalized package name match | Fedora Rawhide package metadata: libdeflate from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Fast implementation of DEFLATE, gzip, and zlib | https://github.com/ebiggers/libdeflate
- dnf - libdeflate-devel - 1.25-5.fc45: normalized package name match | Fedora Rawhide package metadata: libdeflate-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for libdeflate | https://github.com/ebiggers/libdeflate
- dnf - libdeflate-utils - 1.25-5.fc45: normalized package name match | Fedora Rawhide package metadata: libdeflate-utils from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Binaries from libdeflate | https://github.com/ebiggers/libdeflate
- dnf - mingw32-libdeflate - 1.25-5.fc45: normalized package name match | Fedora Rawhide package metadata: mingw32-libdeflate from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | MinGW Windows libdeflate library | https://github.com/ebiggers/libdeflate
- dnf - mingw64-libdeflate - 1.25-5.fc45: normalized package name match | Fedora Rawhide package metadata: mingw64-libdeflate from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | MinGW Windows libdeflate library | https://github.com/ebiggers/libdeflate


## Combined YAML source

View the package source record on GitHub. [combined/libdeflate.yml](https://github.com/mxcl/pkgdb/blob/main/combined/libdeflate.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
