Skip to content

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.

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.

Terminal window
# Make it executable
chmod +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 PATH
sudo mv ./bindu /usr/local/bin/bindu
# Verify
bindu --version
Terminal window
# Make it executable
chmod +x ./bindu
# Move it onto your PATH
sudo mv ./bindu /usr/local/bin/bindu
# Verify
bindu --version
Terminal window
# 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-Null
Move-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 --version
Terminal window
curl -O https://www.gutenberg.org/files/11/11-0.txt
mv 11-0.txt alice.txt
ls -lh alice.txt
# -rw-r--r-- alice.txt 174K
Terminal window
bindu compress alice.txt

This 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 KB
alice.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.

Terminal window
gzip --keep alice.txt
zstd --keep alice.txt -19 -o alice.txt.zst
xz --keep -9e alice.txt
ls -lh alice.txt*

Approximate sizes you’ll see (varies slightly by version):

CodecSizeRatio
alice.txt174 KB1.0×
gzip -6~62 KB2.8×
zstd -19~52 KB3.3×
xz -9e~48 KB3.6×
Bindu~46 KB3.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.

Terminal window
bindu decompress alice.txt.bindu --output alice-roundtrip.txt
diff alice.txt alice-roundtrip.txt
# (no output — files are identical)
shasum alice.txt alice-roundtrip.txt
# matching SHA-1 hashes

Bindu is lossless. The decompressed file is byte-identical to the original.

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.