Very Fast Compression With lz4

Trade some ratio for compression speed in data pipelines.

LinuxperformancearchivecompressLow risk
Run lz4 -k large.log to compress the file and keep the original.

01Command

Command
$ lz4 -k large.log

02What 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

RiskLow risk
Requirementssudo apt install lz4
!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

Last verified: 2026-10-13 · Category: Developer

06Related solutions