Compressing data
This page walks through the standard Bindu workflow on a recognizable file: Alice’s Adventures in Wonderland by Lewis Carroll, taken from the Project Gutenberg public-domain corpus. The same flow applies to any input — telemetry, logs, source code, scientific data — but Alice is small enough to follow along on a laptop and well-known enough to make the search/edit demo on the next page legible.
1. Install Bindu
Section titled “1. Install Bindu”Once you have received the bindu binary from the Bindu team, make it executable and move it onto your PATH. The exact steps depend on your platform.
# Make it executablechmod +x ./bindu
# Clear the quarantine flag if the binary arrived via browser download# or AirDrop (otherwise Gatekeeper will block it)xattr -d com.apple.quarantine ./bindu 2>/dev/null || true
# Move it onto your PATHsudo mv ./bindu /usr/local/bin/bindu
# Verifybindu --version# Make it executablechmod +x ./bindu
# Move it onto your PATHsudo mv ./bindu /usr/local/bin/bindu
# Verifybindu --versionWindows (PowerShell)
Section titled “Windows (PowerShell)”# Unblock the file if it was downloaded from the internet# (otherwise SmartScreen will warn on first run)Unblock-File .\bindu.exe
# Move to a per-user install folder (no admin needed)$dest = "$env:LOCALAPPDATA\Programs\Bindu"New-Item -ItemType Directory -Force -Path $dest | Out-NullMove-Item .\bindu.exe "$dest\bindu.exe"
# Add the folder to your user PATH if it is not already there$userPath = [Environment]::GetEnvironmentVariable("Path", "User")if ($userPath -notlike "*$dest*") { [Environment]::SetEnvironmentVariable("Path", "$userPath;$dest", "User")}
# Open a new PowerShell window, then verify:bindu --version2. Get Alice in Wonderland
Section titled “2. Get Alice in Wonderland”curl -O https://www.gutenberg.org/files/11/11-0.txtmv 11-0.txt alice.txt
ls -lh alice.txt# -rw-r--r-- alice.txt 174K3. Compress with Bindu
Section titled “3. Compress with Bindu”bindu compress alice.txtThis produces alice.txt.bindu alongside the original. Bindu auto-detected English narrative prose and routed the input through the corresponding sub-pipeline (see Overview). Output:
alice.txt 174 KBalice.txt.bindu ~46 KB (~3.8× ratio)The exact ratio depends on the configuration; Bindu lands at roughly the same range as the strongest classical codecs on prose-style English text.
4. Compare with gzip and zstd
Section titled “4. Compare with gzip and zstd”gzip --keep alice.txtzstd --keep alice.txt -19 -o alice.txt.zstxz --keep -9e alice.txt
ls -lh alice.txt*Approximate sizes you’ll see (varies slightly by version):
| Codec | Size | Ratio |
|---|---|---|
alice.txt | 174 KB | 1.0× |
| gzip -6 | ~62 KB | 2.8× |
| zstd -19 | ~52 KB | 3.3× |
| xz -9e | ~48 KB | 3.6× |
| Bindu | ~46 KB | 3.8× |
This is a demonstration of Bindu’s “out of the box on prose” performance. Here we see that Bindu is competitive with the strongest classical codecs, and in this case slightly beats them on compression ratio.
5. Decompress to verify
Section titled “5. Decompress to verify”bindu decompress alice.txt.bindu --output alice-roundtrip.txtdiff alice.txt alice-roundtrip.txt# (no output — files are identical)
shasum alice.txt alice-roundtrip.txt# matching SHA-1 hashesBindu is lossless. The decompressed file is byte-identical to the original.
What’s next
Section titled “What’s next”The compression part is the conventional half of Bindu. The unconventional half is what you can do with the compressed file without ever decompressing it. That’s covered in Operating on compressed data.