# 使用 Homebrew, Nix 安装 lzsa

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

## 安装

```sh
sudo av install brew:lzsa
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lzsa
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#lzsa
```

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

## 软件包事实

- **软件包键:** brew:lzsa
- **软件包管理器:** Homebrew
- **版本:** 1.4.1
- **来源摘要:** Lossless packer that is optimized for fast decompression on 8-bit micros
- **主页:** <https://github.com/emmanuel-marty/lzsa>
- **仓库:** <https://github.com/emmanuel-marty/lzsa>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- lzsa (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

LZSA is Emmanuel Marty's byte-aligned lossless packer family optimized for very fast decompression on 8-bit computers. Its upstream README describes LZSA1 and LZSA2 as formats designed to beat familiar retrocomputing tradeoffs: LZSA1 as an LZ4-like choice for 8-bit scenarios, and LZSA2 as a ZX7-like choice with much faster decompression.

### 项目历史

LZSA is not a general Unix compressor in the gzip tradition. It is a modern tool built for old hardware constraints: small decompressors, simple byte-aligned decoding, limited 8-bit arithmetic, and assets that must unpack quickly on Z80, 6502, 8088, 6809, 6309, and related targets.

The repository combines a command-line compressor, formal stream/block format documents, benchmark comparisons, and contributed assembly depackers. Releases through the 1.3 and 1.4 series focused on ratio improvements, faster LZSA2 compression, and a growing collection of platform-specific depackers.

### 采用历史

LZSA's adoption is concentrated in retrocomputing, demoscene, and homebrew game development rather than mainstream system archives. The official README lists concrete uses including ZX Spectrum demos, Apple II projects, Commander X16 ROM work, RomWBW, rasm-compressed data sections, and Amstrad CPC game assets.

Package-manager adoption is correspondingly smaller than LZ4 or lzip. The input package facts show Homebrew and Nix packages, enough to make the compressor easy to install on developer machines even though the decompression targets are often vintage CPUs.

### 使用方式

Developers run the lzsa tool on modern systems to pack assets, then include the matching depacker on the target machine. The key choice is not just compression ratio but the decompressor's speed and code size on a specific CPU.

The upstream format documentation supports implementers who need to write or audit their own depackers, which is common in size-constrained retro projects.

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

LZSA is package-nerd significant because it is a niche tool with real cross-compilation value: the package runs on modern macOS/Linux build hosts but exists to feed 8-bit runtime environments.

It also shows a different kind of compression packaging pressure. For LZSA, the artifact that matters may be a 67-byte Z80 depacker or a 6502 speed-optimized routine, not a shared library ABI.

### 时间线

- 2010s: LZSA appears as a retrocomputing-focused compressor and format family.
- 2019-2020: Upstream README records use in demos, games, and ROM projects across Z80, 6502, and related systems.
- 2023: GitHub releases include the 1.4.x series, continuing performance and depacker work.

### Related projects

- LZ4 is an explicit design reference for LZSA1.
- ZX7 is an explicit comparison point for LZSA2.
- Lizard/LZ5 and other optimal packers appear in upstream comparisons.

### 来源

- <https://github.com/emmanuel-marty/lzsa>
- <https://github.com/emmanuel-marty/lzsa/blob/master/BlockFormat_LZSA1.md>
- <https://github.com/emmanuel-marty/lzsa/blob/master/BlockFormat_LZSA2.md>
- <https://github.com/emmanuel-marty/lzsa/blob/master/StreamFormat.md>
- <https://github.com/emmanuel-marty/lzsa/releases>
- source_facts.package-manager


## 安全说明

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

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

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

- Nix - lzsa: normalized package name match | nixpkgs package indexes: pkgs/by-name/lz/lzsa/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

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