# 使用 Homebrew, apk, apt, dnf, Nix, pacman 安装 liblzf

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

## 安装

```sh
sudo av install brew:liblzf
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install liblzf
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add liblzf
```

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

- Debian apt (92%):

```sh
sudo apt install liblzf-dev
```

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

- dnf (92%):

```sh
sudo dnf install liblzf
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#liblzf
```

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

- pacman (92%):

```sh
sudo pacman -S liblzf
```

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

## 软件包事实

- **软件包键:** brew:liblzf
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/liblzf>
- **版本:** 3.6
- **来源摘要:** Very small, very fast data compression library
- **主页:** <https://oldhome.schmorp.de/marc/liblzf.html>
- **仓库:** <https://cvs.schmorp.de/liblzf>
- **上游文档:** <https://oldhome.schmorp.de/marc/liblzf.html>
- **许可证:** BSD-2-Clause AND (BSD-2-Clause OR GPL-2.0-or-later)
- **源码归档:** <https://dist.schmorp.de/liblzf/liblzf-3.6.tar.gz>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- lzf (cli)
- lzf (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 3.6
- 本地数据: OK
- 上游仓库: https://oldhome.schmorp.de/marc/liblzf.html
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

liblzf is Marc Lehmann's very small portable-C compression library built around the LZF algorithm. Its niche is fast, easy-to-embed compression rather than maximum compression ratio.

### 项目历史

The project page describes LibLZF as consisting of two .c files and two .h files, designed to be dropped into other programs. The same page emphasizes speed, portability, and a BSD-type license as reasons to use it in applications.

The public header copyright range is 2000-2008 for Marc Alexander Lehmann, which supports liblzf's origin as an early-2000s C library. The NetBSD lzf(1) manual records that the lzf command first appeared with version 0.1 of Marc Lehmann's LZF library and was rewritten for version 2.0.

### 采用历史

liblzf's adoption is mostly embedded and quiet. Redis source code includes lzf.h in its RDB persistence code as the LZF compression library, which made the algorithm familiar to people inspecting Redis dump files even when they never installed the standalone liblzf package.

### 使用方式

Developers embed the small C files directly or link the packaged library, while the lzf command provides a gzip-like utility interface. Build-time knobs such as HLOG, VERY_FAST, ULTRA_FAST, and CHECK_INPUT let embedders trade compression quality, speed, memory, and input validation.

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

liblzf matters to package nerds because it is a classic tiny-C-library package: old, compact, permissively licensed, easy to vendor, and still visible through larger systems that adopted its file-format behavior.

### 时间线

- 2000: Public source headers begin their copyright range.
- 2008: Public source headers end the original copyright range at 2008.
- 2014: NetBSD 7.0 manual documented the lzf command as appearing in NetBSD 7.0.
- 2026: Homebrew batch metadata listed liblzf alongside Debian, Fedora, Nix, Arch, Ubuntu, and Alpine packages.

### Related projects

- Redis uses LZF compression code in RDB persistence.
- The lzf-rs Rust project and Compress::LZF Perl module are examples of later language bindings or rewrites around the same small LZF format.

### 来源

- <https://download.redis.io/redis-stable/src/lzf.h>
- <https://download.redis.io/redis-stable/src/rdb.c>
- <https://github.com/nemequ/liblzf/blob/master/lzf.h>
- <https://man.netbsd.org/NetBSD-7.0/lzf.1>
- <https://oldhome.schmorp.de/marc/liblzf.html>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** liblzf
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - liblzf-dev - 3.6-4+b3: normalized package name match | Debian stable package indexes: liblzf-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Very small data compression library - development headers | http://software.schmorp.de/pkg/liblzf.html
- Debian apt - liblzf1 - 3.6-4+b3: normalized package name match | Debian stable package indexes: liblzf1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Very small data compression library | http://software.schmorp.de/pkg/liblzf.html
- Nix - liblzf: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/liblzf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - liblzf-dev - 3.6-4: normalized package name match | Ubuntu 24.04 LTS package indexes: liblzf-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Very small data compression library - development headers | http://software.schmorp.de/pkg/liblzf.html
- Ubuntu apt - liblzf1 - 3.6-4: normalized package name match | Ubuntu 24.04 LTS package indexes: liblzf1 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Very small data compression library | http://software.schmorp.de/pkg/liblzf.html
- apk - liblzf - 3.6-r1: normalized package name match | Alpine Linux edge package indexes: liblzf from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A very small data compression library | http://software.schmorp.de/pkg/liblzf.html
- apk - liblzf-dev - 3.6-r1: normalized package name match | Alpine Linux edge package indexes: liblzf-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A very small data compression library (development files) | http://software.schmorp.de/pkg/liblzf.html
- dnf - liblzf - 3.6-34.fc44: normalized package name match | Fedora Rawhide package metadata: liblzf from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Small data compression library | http://oldhome.schmorp.de/marc/liblzf.html
- dnf - liblzf-devel - 3.6-34.fc44: normalized package name match | Fedora Rawhide package metadata: liblzf-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for liblzf | http://oldhome.schmorp.de/marc/liblzf.html
- pacman - liblzf - 3.6-5: normalized package name match | Arch Linux sync databases: liblzf from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A very small data compression library | http://software.schmorp.de/pkg/liblzf.html


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Archive and compression packages](https://www.automicvault.com/zh-hans/pkg/archive-compression-tools/) - Matched archive or compression metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [bzip2](https://www.automicvault.com/zh-hans/pkg/brew/bzip2/) - Shares av.db curated category or tags: cli, compression, data, library.
- [zfp](https://www.automicvault.com/zh-hans/pkg/brew/zfp/) - Shares av.db curated category or tags: c, cli, compression, data.
- [bzip3](https://www.automicvault.com/zh-hans/pkg/brew/bzip3/) - Shares av.db curated category or tags: cli, compression, data.
- [cmix](https://www.automicvault.com/zh-hans/pkg/brew/cmix/) - Shares av.db curated category or tags: cli, compression, data.
- [hdt](https://www.automicvault.com/zh-hans/pkg/brew/hdt/) - Shares av.db curated category or tags: cli, compression, data.
- [heatshrink](https://www.automicvault.com/zh-hans/pkg/brew/heatshrink/) - Shares av.db curated category or tags: cli, compression, data.
- [precomp](https://www.automicvault.com/zh-hans/pkg/brew/precomp/) - Shares av.db curated category or tags: cli, compression, data.
- [zxc](https://www.automicvault.com/zh-hans/pkg/brew/zxc/) - Shares av.db curated category or tags: cli, compression, data.

## Combined YAML source

View the package source record on GitHub. [combined/liblzf.yml](https://github.com/automic-vault/db/blob/main/combined/liblzf.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
