How to compress and decompress files, folders and archives, how the byte-exact restore with SHA-256 verification works, what the +1 byte never-worse floor guarantees, and how streaming handles large inputs. Sizes from 0 B to 50 MB are measured; very large jobs are honest about staging.
compress -> smallest verified .pdli -> decompress -> original bytes (SHA-256 match)
Every restore must reproduce the original byte-for-byte and SHA-256-match, or the result stays proof-only / diagnostic.
01 - The two operations
There are two operations. Compress reads your input as raw bytes, orchestrates SRD math together with standard codecs (xz, zstd, brotli), and writes the smallest output that passed the SHA-256 roundtrip into a portable .pdli container. Decompress reads that container and reconstructs the original bytes exactly.
The Orchestrator never ships a candidate it cannot restore. Only candidates whose restored bytes SHA-256-match the original stay eligible; the smallest of those wins.
# compress a single file
pdli compress report.csv -o report.csv.pdli
# compress a folder (whole tree)
pdli compress ./project -o project.pdli
# verbose: show candidate sizes and the winner
pdli compress data.bin -o data.pdli --explain
Decompress applies the inverse and writes back exact bytes. The SHA-256 of the restored output is checked against the value sealed at compress time.
# restore a single file
pdli decompress report.csv.pdli -o report.csv
# restore a folder tree to a directory
pdli decompress project.pdli -o ./restored
# verify without writing (hash-only check)
pdli verify project.pdli
COMPRESS
input -> SRD math + codecs -> smallest verified .pdli
DECOMPRESS
file.pdli -> inverse -> original bytes (SHA-256 match)
02 - Workflow
The same compress / decompress pair handles a single file, a whole directory tree, or a re-archive of many inputs. Structure, paths and byte content are all preserved exactly.
Any one file enters as raw bytes - format is irrelevant to correctness. The output is one .pdli container that restores to the identical file.
pdli compress movie.mp4 \
-o movie.mp4.pdli
pdli decompress movie.mp4.pdli \
-o movie.mp4
Point at a directory and the full tree - subfolders, paths and per-file bytes - is captured into one container and restored to the same layout.
pdli compress ./logs \
-o logs.pdli
pdli decompress logs.pdli \
-o ./logs-restored
An existing archive (ZIP, tar) is just bytes, so it compresses like any file. Already-compressed archives commonly take the proof-only path - see the never-worse floor below.
pdli compress backup.tar \
-o backup.tar.pdli
pdli compress *.json \
-o bundle.pdli
03 - Integrity
Integrity is checked, not assumed. At compress time the original is hashed; at restore time the reconstructed bytes are hashed again and the two SHA-256 values must match. A mismatch is a hard failure - the result is never silently shipped.
The SHA-256 of the original input is computed and recorded in the container so the expected value travels with the data.
The reconstructed bytes are hashed and compared to the sealed value. Equal means byte-exact; unequal means the restore is rejected.
Run a standard SHA-256 over the original and the restored output with your own tool - the digests match. Trust is reproducible.
# 1. hash the original
sha256sum report.csv
# 2. compress, then decompress
pdli compress report.csv -o report.csv.pdli
pdli decompress report.csv.pdli -o report.restored.csv
# 3. hash the restored output - digests must be identical
sha256sum report.restored.csv
# or let the Orchestrator confirm it:
pdli verify report.csv.pdli # -> OK: SHA-256 match (byte-exact)
04 - The floor
Because the Orchestrator keeps the smallest verified output among SRD math and the standard codecs, the result is never larger than the best standard codec - worst case it adds one byte of container overhead. It does not invent savings on incompressible data.
05 - Sizes & streaming
Inputs from an empty 0-byte file up to 50 MB are measured directly. Beyond that, large inputs stream through in bounded memory so the whole payload never has to sit in RAM at once.
Edge cases first: a 0-byte file restores to a 0-byte file. Tiny inputs honor the never-worse floor and verify in milliseconds.
The measured working range. Candidates are orchestrated and SHA-256-verified end to end on the whole input.
Streaming kicks in: the input flows through in bounded-memory chunks, so size is not a hard limit on the box that runs it.
06 - FAQ
pdli compress <input> -o out.pdli writes the smallest verified container; pdli decompress out.pdli -o <path> reconstructs the original bytes. Both work on files, folders and archives.pdli verify out.pdli performs the same check for you.Drop a file in the browser, get a byte-exact .pdli, and confirm the SHA-256 roundtrip yourself. Then read the benchmarks.
No credit card - zero storage on the browser trial - SHA-256 byte-exact restore