# Install liblzf with Homebrew, apk, apt, dnf, Nix, pacman

Very small, very fast data compression library. Version 3.6 via Homebrew; verified from local package data.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install liblzf
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add liblzf
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: 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
```

  Evidence: 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
```

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

## Package facts

- **Package key:** brew:liblzf
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/liblzf>
- **Version:** 3.6
- **Source summary:** Very small, very fast data compression library
- **Homepage:** <https://oldhome.schmorp.de/marc/liblzf.html>
- **Repository:** <https://cvs.schmorp.de/liblzf>
- **Upstream docs:** <https://oldhome.schmorp.de/marc/liblzf.html>
- **License:** BSD-2-Clause AND (BSD-2-Clause OR GPL-2.0-or-later)
- **Source archive:** <https://dist.schmorp.de/liblzf/liblzf-3.6.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- lzf (cli)
- lzf (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.6
- Local data: ok
- Upstream repository: https://oldhome.schmorp.de/marc/liblzf.html
- info: No package-manager update timestamp was available.
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **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

## Other Package-Manager Records

- 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


## Related links

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


## Sources

- 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
