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

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

## 安装

```sh
sudo av install brew:zopfli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install zopfli
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install zopfli
```

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

### Linux

- apk (92%):

```sh
sudo apk add zopfli
```

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

- Debian apt (92%):

```sh
sudo apt install zopfli
```

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

- dnf (92%):

```sh
sudo dnf install zopfli
```

  证据: Fedora Rawhide package metadata: zopfli 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#zopfli
```

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

- pacman (92%):

```sh
sudo pacman -S zopfli
```

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

- zypper (92%):

```sh
sudo zypper install zopfli
```

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

## 软件包事实

- **软件包键:** brew:zopfli
- **软件包管理器:** Homebrew
- **版本:** 1.0.3
- **来源摘要:** New zlib (gzip, deflate) compatible compressor
- **主页:** <https://github.com/google/zopfli>
- **仓库:** <https://github.com/google/zopfli>
- **最后更新:** 2026-07-10T09:36:36-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- zopfli (别名)
- zopflipng (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Zopfli is Google's deliberately slow, very dense Deflate-compatible compressor. It matters because its output can be read by ordinary gzip, zlib, ZIP, PNG, and HTTP Deflate consumers, making it a packageable optimization step rather than a new compression format users must support.

### 项目历史

Google announced Zopfli in February 2013 as an open-source implementation of Deflate designed to produce smaller output than previous techniques. The name came from a Swiss bread recipe, but the engineering idea was serious: spend much more CPU time during compression while keeping decompression speed and compatibility unchanged.

The GitHub project describes Zopfli as a C compression library for very good but slow Deflate or zlib compression, created by Lode Vandevenne and Jyrki Alakuijala and based on Alakuijala's algorithm. The repository also contains the zopfli CLI and zopflipng, a PNG optimizer built around the same Deflate search.

### 采用历史

Zopfli spread first through web-performance and asset-optimization workflows, where build time is cheaper than bandwidth. Because it emits standard Deflate streams, users could precompress static assets and serve them through existing HTTP and archive tooling without changing client decompression support.

ZopfliPNG extended the same idea into image optimization: PNG files already use Deflate internally, so better Deflate choices can shrink files without changing the image format. That made the package especially interesting to people tuning websites, fonts, archives, and static downloadable assets.

### 使用方式

The zopfli executable is best used offline: compress a file once, keep the smaller gzip/zlib/deflate result, and let normal clients decompress it. It is usually a poor choice for live request-time compression because the whole point is spending extra CPU to find a smaller representation.

zopflipng is the companion CLI for PNGs. It tries Zopfli Deflate plus PNG-specific filter and color choices, and it may remove ancillary chunks that are not needed for typical web rendering, so visual checks and metadata awareness matter when using it in asset pipelines.

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

Zopfli is a perfect package-nerd tool because it is small, sharp, and intentionally asymmetric: slow compression, standard decompression. It rewards users who understand build artifacts, static hosting, and the difference between a file format and an encoder.

It also sits in a recognizable Google compression lineage with Brotli and later web-compression work, but unlike Brotli it did not ask the ecosystem to adopt a new wire format. That compatibility is why it still shows up as a practical CLI package.

### 时间线

- 2013: Google announces Zopfli as an open-source, Deflate-compatible compressor optimized for smaller output.
- 2013: The reference implementation is published in C by Lode Vandevenne and Jyrki Alakuijala.
- 2013: ZopfliPNG appears as a PNG optimization tool using Zopfli compression for PNG Deflate streams.
- 2010s: Zopfli becomes a build-time optimization option for static web assets, archives, PNGs, and other Deflate-based formats.
- 2015: Brotli appears as a related Google compression project aimed at a newer web compression format rather than Deflate compatibility.

### Related projects

- zlib: the ubiquitous Deflate implementation whose output compatibility made Zopfli practical.
- gzip and ZIP: container formats that can benefit from better Deflate streams.
- zopflipng: the PNG optimizer shipped with the Zopfli project.
- Brotli: a later Google compression format with stronger web adoption but different compatibility tradeoffs.
- AdvanceCOMP and OxiPNG: PNG/archive optimization tools in the neighboring lossless-compression niche.

### 来源

- <https://developers.googleblog.com/compress-data-more-densely-with-zopfli/>
- <https://github.com/google/zopfli>
- <https://github.com/google/zopfli/blob/master/README.zopflipng>
- <https://opensource.googleblog.com/2013/02/compress-data-more-densely-with-zopfli.html>
- <https://opensource.googleblog.com/2015/09/introducing-brotli-new-compression.html>


## 安全说明

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

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

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

- Debian apt - libzopfli-dev - 1.0.3-3: normalized package name match | Debian stable package indexes: libzopfli-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Header and static library files for libzopfli1 | https://github.com/google/zopfli
- Debian apt - libzopfli1 - 1.0.3-3: normalized package name match | Debian stable package indexes: libzopfli1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | zlib (gzip, deflate) compatible compressor - shared library | https://github.com/google/zopfli
- Debian apt - zopfli - 1.0.3-3: normalized package name match | Debian stable package indexes: zopfli from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | zlib (gzip, deflate) compatible compressor | https://github.com/google/zopfli
- Nix - zopfli: normalized package name match | nixpkgs package indexes: pkgs/by-name/zo/zopfli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libzopfli-dev - 1.0.3-2: normalized package name match | Ubuntu 24.04 LTS package indexes: libzopfli-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Header and static library files for libzopfli1 | https://github.com/google/zopfli
- Ubuntu apt - libzopfli1 - 1.0.3-2: normalized package name match | Ubuntu 24.04 LTS package indexes: libzopfli1 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | zlib (gzip, deflate) compatible compressor - shared library | https://github.com/google/zopfli
- Ubuntu apt - zopfli - 1.0.3-2: normalized package name match | Ubuntu 24.04 LTS package indexes: zopfli from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | zlib (gzip, deflate) compatible compressor | https://github.com/google/zopfli
- apk - zopfli - 1.0.3_git20260213-r0: normalized package name match | Alpine Linux edge package indexes: zopfli from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Compression algorithm library | https://github.com/fonttools/zopfli
- apk - zopfli-dev - 1.0.3_git20260213-r0: normalized package name match | Alpine Linux edge package indexes: zopfli-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Compression algorithm library (development files) | https://github.com/fonttools/zopfli
- apk - zopfli-doc - 1.0.3_git20260213-r0: normalized package name match | Alpine Linux edge package indexes: zopfli-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Compression algorithm library (documentation) | https://github.com/fonttools/zopfli
- dnf - zopfli - 1.0.3-16.fc45: normalized package name match | Fedora Rawhide package metadata: zopfli from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Zlib compatible better compressor | https://github.com/google/zopfli
- dnf - zopfli-devel - 1.0.3-16.fc45: normalized package name match | Fedora Rawhide package metadata: zopfli-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for zopfli and zopflipng. | https://github.com/google/zopfli
- pacman - zopfli - 1.0.3-5: normalized package name match | Arch Linux sync databases: zopfli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Compression algorithm library | https://github.com/google/zopfli
- zypper - libzopfli-devel - 1.0.3-2.11: normalized package name match | openSUSE Tumbleweed package metadata: libzopfli-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Header files for libzopfli, a gzip-compatible compressor | https://github.com/google/zopfli
- zypper - libzopfli1 - 1.0.3-2.11: normalized package name match | openSUSE Tumbleweed package metadata: libzopfli1 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Deflate/zlib compatible compression library | https://github.com/google/zopfli
- zypper - libzopfli1-x86-64-v3 - 1.0.3-2.11: normalized package name match | openSUSE Tumbleweed package metadata: libzopfli1-x86-64-v3 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Deflate/zlib compatible compression library | https://github.com/google/zopfli


## 相关链接

- [zopfli](https://pkg.so/zh-hans/pkg/cargo/zopfli/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/zopfli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/zopfli.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
