# 使用 Homebrew, MacPorts, Nix 安装 afsctool

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

## 安装

```sh
sudo av install brew:afsctool
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install afsctool
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install afsctool
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#afsctool
```

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

## 软件包事实

- **软件包键:** brew:afsctool
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/afsctool>
- **版本:** 1.7.3
- **来源摘要:** Utility for manipulating APFS and ZFS compressed files
- **主页:** <https://brkirch.wordpress.com/afsctool/>
- **仓库:** <https://github.com/RJVB/afsctool>
- **上游文档:** <https://brkirch.wordpress.com/afsctool>
- **许可证:** GPL-3.0-only AND BSL-1.0
- **源码归档:** <https://github.com/RJVB/afsctool/archive/refs/tags/v1.7.3.tar.gz>
- **最后更新:** 2026-07-02T11:12:14-04:00
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- afsctool (cli)
- zfsctool (cli)
- afsctool (别名)
- zfsctool (别名)

## 构建依赖

- cmake
- google-sparsehash
- pkgconf

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 1.7.3
- 管理器更新时间: 2026-07-02
- 本地数据: OK
- 上游仓库: https://github.com/RJVB/afsctool
- 检测到的最新版本: v1.7.3 (当前)
## 项目历史与用法

afsctool is a command-line utility for applying, removing, and inspecting Apple filesystem compression. The original brkirch page describes it as an AFSC tool for HFS+ compression on Mac OS X 10.6 or later; the packaged RJVB fork extends that lineage with APFS-related work and a companion zfsctool.

### 项目历史

The original afsctool was published by brkirch as a Mac OS X utility for HFS+ compression. The RJVB repository identifies itself as a modified version of brkirch's afsctool and documents changes around error reporting, large-file memory pressure, multiple file arguments, backups, read-only files, and parallel compression.

The RJVB fork became the source used by modern package managers. Its README records versioned feature work in the 1.6 and 1.7 series, including parallel compression options, additional compression types introduced by Apple in OS X 10.9 and later, LZVN support, and later LZFSE support.

### 采用历史

afsctool is narrow but useful enough to appear in macOS-oriented package sets: the supplied facts list Homebrew, MacPorts, and Nix. That adoption tracks its niche: users who need to inspect or recompress files with Apple filesystem compression from scripts rather than through Finder or filesystem internals.

The RJVB fork also documents package-manager build dependencies and gives Homebrew and MacPorts examples, which helps explain why downstream formulae can build it despite the tool's macOS-specific subject matter.

### 使用方式

Typical usage is post-hoc compression or inspection of files and folders already on a supported filesystem. The RJVB fork adds options for parallel compression, sorting work items by size, and changing compression types when the operating system and linked libraries support them.

zfsctool, built from the same repository, adapts the afsctool idea to ZFS recompression statistics and experiments. The README is explicit that zfsctool is still a work in progress, so package users should treat afsctool as the primary stable executable.

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

afsctool is a classic small system package: obscure until you need it, highly platform-specific, and tightly bound to filesystem behavior and Apple compression formats. It is interesting to package maintainers because its dependency story and feature set move with macOS filesystem APIs and compression libraries.

The Homebrew formula exposes the RJVB fork rather than only the older brkirch page, so curation needs both sources: the original homepage explains the tool's purpose, while the repository explains the maintained code users actually install.

### 时间线

- 2012: brkirch afsctool page published for the original AFSC utility.
- 2015: RJVB afsctool GitHub repository created.
- 2018: RJVB 1.6.9 release commit added size sorting and reverse-worker options for parallel mode.
- 2024: RJVB repository still receiving updates according to GitHub metadata.

### Related projects

- Apple HFS+ and APFS filesystem compression are the core operating-system features afsctool manipulates.
- RJVB's LZVN fork and the lzfse/lzfse reference implementation are mentioned by the README as compression-library dependencies in the 1.7 series.
- zfsctool is the same repository's experimental ZFS-oriented companion utility.

### 来源

- <https://api.github.com/repos/RJVB/afsctool>
- <https://brkirch.wordpress.com/afsctool/>
- <https://github.com/RJVB/afsctool#readme>
- source_facts.package-manager


## 安全说明

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

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

## 源数据库详情

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

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

- Nix - afsctool: normalized package name match | nixpkgs package indexes: pkgs/by-name/af/afsctool/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - afsctool: normalized package name match | MacPorts ports tree: sysutils/afsctool/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow 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.
- [cmake](https://www.automicvault.com/zh-hans/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/zh-hans/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [acl](https://www.automicvault.com/zh-hans/pkg/brew/acl/) - Shares av.db curated category or tags: cli, filesystem, system.
- [afuse](https://www.automicvault.com/zh-hans/pkg/brew/afuse/) - Shares av.db curated category or tags: cli, filesystem, system.
- [attr](https://www.automicvault.com/zh-hans/pkg/brew/attr/) - Shares av.db curated category or tags: cli, filesystem, system.
- [avfs](https://www.automicvault.com/zh-hans/pkg/brew/avfs/) - Shares av.db curated category or tags: cli, filesystem, system.
- [bindfs](https://www.automicvault.com/zh-hans/pkg/brew/bindfs/) - Shares av.db curated category or tags: cli, filesystem, system.
- [convmv](https://www.automicvault.com/zh-hans/pkg/brew/convmv/) - Shares av.db curated category or tags: cli, filesystem, system.
- [cpmtools](https://www.automicvault.com/zh-hans/pkg/brew/cpmtools/) - Shares av.db curated category or tags: cli, filesystem, system.
- [dfc](https://www.automicvault.com/zh-hans/pkg/brew/dfc/) - Shares av.db curated category or tags: cli, filesystem, system.
- [dar](https://www.automicvault.com/zh-hans/pkg/brew/dar/) - Local package facts share a topical domain. Shared terms: cli, compression, files, filesystem, system.
- [duff](https://www.automicvault.com/zh-hans/pkg/brew/duff/) - Local package facts share a topical domain. Shared terms: cli, files, filesystem, system.
- [rdfind](https://www.automicvault.com/zh-hans/pkg/brew/rdfind/) - Local package facts share a topical domain. Shared terms: cli, files, filesystem, system.

## Combined YAML source

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