commands.sh

lz4

all

Compress or decompress .lz4 files.

More info →

Options (3)

-d, --decompressboolean

Decompress a file

Example: lz4 {{[-d|--decompress]}} {{file.lz4}}
boolean

Decompress a file and write to `stdout`

Example: lz4 {{[-dc|--decompress --stdout]}} {{file.lz4}}
--bestboolean

Compress a file using the best compression

Example: lz4 {{[-12|--best]}} {{path/to/file}}

Examples (6)

Compress a file

lz4 path/to/file

Decompress a file

lz4 [-d|--decompress] file.lz4

Decompress a file and write to `stdout`

lz4 [-dc|--decompress --stdout] file.lz4

Package and compress a directory and its contents

tar cvf - path/to/directory | lz4 - dir.tar.lz4

Decompress and unpack a directory and its contents

lz4 [-dc|--decompress --stdout] dir.tar.lz4 | tar -xv

Compress a file using the best compression

lz4 [-12|--best] path/to/file
made by @shridhargupta | data from tldr-pages