Very Fast Compression With lz4
Trade some ratio for compression speed in data pipelines.
Run lz4 -k large.log to compress the file and keep the original.
01Command
Command
$ lz4 -k large.log02What it does
lz4 compresses at hundreds of megabytes per second, which makes it ideal for streaming logs, cache files and temporary pipelines where decompression speed matters more than the smallest size. It decompresses even faster than it compresses.
03Risk
!Warning: The compression ratio is lower than gzip or xz; use it for speed-sensitive cases, not long-term archival.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- lz4.1.en.html manual page (Debian bookworm)Evidence: Documents lz4, a very fast lossless compression algorithm and CLI.
Last verified: 2026-10-13 · Category: Developer
06Related solutions
Snapshot System Health with vmstat
vmstat gives a compact one-line-per-interval view of CPU usage, swap activity, and I/O waits that top doesn't summarize as clearly.
Split Large Files and Rejoin Them with split and cat
split cuts a file into size-bounded chunks; cat concatenated in order rebuilds the original byte-for-byte.