Skip to content

Repository files navigation

QuikHash

FastCDC + BLAKE3 content-addressed hasher that can also reconstruct files from chunk sets.

CI License: MIT Go Reference

Plenty of FastCDC libraries exist. Almost none ship a polished single-binary CLI where chunking, strong hashing, and reconstruction are first-class operations. QuikHash does.

quikhash hash ./video.mp4 -o video.quikhash.json
quikhash verify ./video.mp4 --manifest video.quikhash.json
quikhash dump ./video.mp4 --manifest video.quikhash.json --out chunks/
quikhash reconstruct --chunks chunks/ --manifest video.quikhash.json --out video.restored.mp4
quikhash diff old.json new.json

Why QuikHash?

Capability What you get
Streaming FastCDC Content-defined chunks that survive inserts/shifts
BLAKE3 Fast cryptographic digests for each chunk + whole file
Manifests JSON with offsets, lengths, digests — easy to inspect and diff
Dump Extract content-addressed chunk files by digest
Reconstruct Rebuild a file from any complete chunk set + manifest
Diff Show only changed chunks between two manifests
Parallel + resume Directory hashing and dump/reconstruct use workers; dump skips existing chunks

Install

Homebrew

brew install shaneburrell/tap/quikhash

The formula is maintained in shaneburrell/homebrew-tap and tracks GitHub Releases.

Prebuilt binaries

Download from Releases for macOS, Linux, and Windows (amd64 & arm64).

From source

Requires Go 1.22+.

go install github.com/shaneburrell/quikhash/cmd/quikhash@latest

Or clone and build:

git clone https://github.com/shaneburrell/quikhash.git
cd quikhash
make build
./bin/quikhash --version

Cross-compile everything:

make build-all   # → dist/ for darwin/linux/windows × amd64/arm64

Commands

hash — produce a manifest

quikhash hash <path>                         # JSON manifest → stdout
quikhash hash <path> -o file.quikhash.json   # write to file
quikhash hash ./dir -o ./manifests           # parallel, one manifest per file

verify — check a file against a manifest

quikhash verify <path> --manifest m.json

dump — extract individual chunks

quikhash dump <path> --out chunks/
quikhash dump <path> --manifest m.json --out chunks/   # skip re-hash

Chunk files are named by their BLAKE3 hex digest. --resume (default) skips chunks that already exist with matching content.

reconstruct — rebuild from chunks + manifest

quikhash reconstruct --chunks chunks/ --manifest m.json --out file

Writes to a temp file, verifies the whole-file BLAKE3 digest, then atomically renames.

diff — changed chunks only

quikhash diff manifest1.json manifest2.json
quikhash diff a.json b.json --json

Flags

Flag Description
--avg-size FastCDC average chunk size (default 64K)
--min-size FastCDC minimum chunk size (default 16K)
--max-size FastCDC maximum chunk size (default 256K)
--json Machine-readable JSON output
-q, --quiet Suppress progress bar
--workers Parallelism for directory hash / dump / reconstruct

Sizes accept K/KiB, M/MiB, G/GiB suffixes.

Manifest format

{
  "version": 1,
  "path": "/data/video.mp4",
  "size": 10485760,
  "digest": "<blake3-256 hex of whole file>",
  "avg_size": 65536,
  "min_size": 16384,
  "max_size": 262144,
  "chunks": [
    { "offset": 0, "length": 42188, "digest": "<blake3-256 hex>" }
  ]
}

Differentiation

Most CDC tools stop at “print the chunks.” QuikHash treats reconstruction + strong crypto hash in one tiny static binary as the product — the same FastCDC + BLAKE3 core used by QuikSync.

Development

make build       # → bin/quikhash
make test        # unit + e2e
make test-race
make cover       # coverage gate
make build-all   # cross-compile to dist/

Tagged releases (v*) are published via GoReleaser.

License

MIT © 2026 Shane Burrell

About

FastCDC + BLAKE3 content-addressed hasher with first-class reconstruction

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages