macOS
brew install libcmphlocal Homebrew formula metadata
sudo port install cmphMacPorts ports tree · textproc/cmph/Portfile · source: api.github.com
brew
C minimal perfect hashing library. Version 2.0.2 via Homebrew; verified 2026-06-19.
install
brew install libcmphlocal Homebrew formula metadata
sudo port install cmphMacPorts ports tree · textproc/cmph/Portfile · source: api.github.com
sudo apk add libcmphAlpine Linux edge package indexes · libcmph · source: dl-cdn.alpinelinux.org
sudo apt install libcmph-devDebian stable package indexes · libcmph-dev · source: deb.debian.org
nix profile install nixpkgs#cmphnixpkgs package indexes · pkgs/by-name/cm/cmph/package.nix · source: api.github.com
overview
C minimal perfect hashing library
history
CMPH is a C library and command-line tool for building minimal perfect hash functions. It targets static key sets where compact storage and collision-free lookup matter more than insertion or deletion.
The CMPH site frames the project around a gap in free software support for minimal perfect hashing, distinguishing it from GNU gperf by emphasizing very large key sets rather than small generated perfect-hash functions. Its documentation collects several algorithms, including CHD, BDZ, BMZ, BRZ, CHM, and FCH.
By the 1.x and 2.x news entries, CMPH had grown beyond a single algorithm implementation into a practical library with packed-function support, memory-mappable output, an external-memory BRZ path for very large sets, and an experimental C++ interface for map-like use cases.
CMPH has remained a niche but durable package because minimal perfect hashes are a specialized data-structure tool. It appears in Homebrew, Debian and Ubuntu development packages, MacPorts, Nix, Alpine, and other package collections for developers who need static dictionary or key-index construction.
Typical usage is offline construction of a hash function from a fixed key set, followed by storage or embedding of the generated function. The official examples show the C API creating a minimal perfect hash from an in-memory vector and dumping it to a file.
CMPH is the kind of package that matters disproportionately to systems and search developers: it packages academic minimal-perfect-hashing algorithms into a reusable C interface and a small CLI. Its appeal is that it turns a static corpus into dense one-probe lookup tables without hauling in a database.
security posture
library-like package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
cmph | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:libcmph |
|---|---|
| Version | 2.0.2 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/libcmph |
| Homepage | https://cmph.sourceforge.net/ |
| Repository | https://sourceforge.net/p/cmph/git |
| Upstream docs | https://cmph.sourceforge.net/ |
| License | LGPL-2.1-only OR MPL-1.1 |
| Source archive | https://downloads.sourceforge.net/project/cmph/v2.0.2/cmph-2.0.2.tar.gz |
| Last updated | 2026-06-19T12:31:49-07:00 |
| Pulse | updated |
| Bottle | available (on arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | libcmph |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
libcmph 2.0.2-r6
A minimal perfect hash C library
sudo apk add libcmphcmph
sudo port install cmphlibcmph-dev 2.0.2-3.1
C Minimal Perfect Hashing Library development files
sudo apt install libcmph-devlibcmph-tools 2.0.2-3.1
C Minimal Perfect Hashing Library command line utilities
sudo apt install libcmph-toolslibcmph0t64 2.0.2-3.1
C Minimal Perfect Hashing Library
sudo apt install libcmph0t64cmph
nix profile install nixpkgs#cmphlibcmph-dev 2.0.2-3.1build1
C Minimal Perfect Hashing Library development files
sudo apt install libcmph-devlibcmph-tools 2.0.2-3.1build1
C Minimal Perfect Hashing Library command line utilities
sudo apt install libcmph-toolslibcmph0t64 2.0.2-3.1build1
C Minimal Perfect Hashing Library
sudo apt install libcmph0t64cmph 2.0.2-r6
A minimal hash C library - utility application
sudo apk add cmphcmph-dev 2.0.2-r6
A minimal hash C library - utility application (development files)
sudo apk add cmph-devcmph-doc 2.0.2-r6
A minimal hash C library - utility application (documentation)
sudo apk add cmph-docsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.