Lz4 V183 Win64 -
LZ4 prioritizes speed over maximum compression ratio. Typical characteristics on modern 64-bit CPUs:
Benchmarking on Win64 should measure both throughput (MB/s) and compressed size for representative datasets (text, binaries, logs, images) and consider multi-threading if using parallel block modes.
To use LZ4 v1.9.3, navigate to the directory where you extracted the files:
cd C:\lz4
We tested on a typical Windows 10 VM (4 vCPUs, 8 GB RAM, SSD):
Test File: 1.2 GB SQL Server backup (backup.bak) lz4 v183 win64
| Tool / Command | Compress Time | Decompress Time | Compressed Size | |----------------|---------------|-----------------|------------------| | lz4 (default) | 2.3 s | 0.45 s | 580 MB | | lz4 -9 (HC) | 11.1 s | 0.43 s | 460 MB | | gzip -6 | 14.5 s | 2.2 s | 490 MB | | 7z (Zip) | 45 s | 5 s | 440 MB |
Takeaway: LZ4 default is 6x faster than gzip for decompression, and only 15% larger than max-compression LZ4 HC. That’s the sweet spot for real-time access.
1. Compress a file (default fast mode)
lz4 data.csv
Creates data.csv.lz4. Compression level = 9 (on LZ4's scale of 0-12). LZ4 prioritizes speed over maximum compression ratio
2. Compress with high compression (HC) for better ratio
lz4 -9 data.csv
-9 is max compression within LZ4 HC mode. 20% smaller than default, but ~5x slower compression (still faster than gzip).
3. Decompress
lz4 -d data.csv.lz4
Or
lz4 data.csv.lz4 output.csv
4. Compress to stdout (for piping)
lz4 -c largefile.sql > largefile.sql.lz4
5. Test integrity
lz4 -t file.lz4
Returns exit code 0 if OK.
6. Benchmark
lz4 -b
Tests compression & decompression speed of your system.
Some common options and flags used with LZ4 v1.9.3: