CHB (Colony Hash Bucket) is a lightweight on-disk hash table designed for simplicity, predictability, and fast key-value lookups. Data is organized into a fixed-size bucket directory that maps hash values to chains of records stored in a compact append-only area.
Each record contains a pointer to the next record in the chain, a key-length field with deletion flag support, and a fixed-size payload area. Bucket count and record size are configurable at file creation time, allowing CHB to be tuned for different workloads while preserving a simple and deterministic layout.
The format is page-oriented (4 KiB aligned), easy to inspect, recover, and implement, requiring no complex trees, transactions, or variable-length record management. Deleted records can be recycled within their bucket chains, reducing fragmentation without introducing free-list complexity.
CHB is ideal for caches, kv stores, indexes where low implementation complexity is more important than full database features.

Features

  • Persistent on-disk hash table storage
  • Fixed-size records for predictable performance
  • Configurable bucket count (MUL) and record size (SZE)
  • 100% PHP
  • Fast O(1) average key lookups
  • Separate bucket directory and data area
  • Collision handling through record chaining
  • No external dependencies
  • Logical deletion support with recycle of deleted records
  • Concurrent access with file locking

Project Activity

See All Activity >

License

GNU Library or Lesser General Public License version 3.0 (LGPLv3)

Follow chb

chb Web Site

Other Useful Business Software
PRTG Catches Network Issues Before They Cause Downtime Icon
PRTG Catches Network Issues Before They Cause Downtime

Threshold-based alerts flag problems early, so your team can act before users notice, not after.

Reactive troubleshooting usually means hearing about a problem from frustrated users, not your monitoring tool. PRTG sets threshold-based alerts across devices, servers and applications, notifying your team by email, SMS or push the moment a metric crosses a set limit. That means catching a failing disk or overloaded server before it becomes an outage and getting time back from firefighting. Start a free trial and set your first alerts today.
Download 30-Day Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of chb!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Intended Audience

Developers

Programming Language

PHP

Related Categories

PHP Database Engines Servers

Registered

2026-07-05