2025-03-14 21:59:59 -06:00
|
|
|
# lz4
|
|
|
|
|
|
|
|
|
|
> Compress or decompress .lz4 files.
|
|
|
|
|
> More information: <https://github.com/lz4/lz4>.
|
|
|
|
|
|
|
|
|
|
- Compress a file:
|
|
|
|
|
|
|
|
|
|
`lz4 {{path/to/file}}`
|
|
|
|
|
|
|
|
|
|
- Decompress a file:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`lz4 {{[-d|--decompress]}} {{file.lz4}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Decompress a file and write to `stdout`:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`lz4 {{[-dc|--decompress --stdout]}} {{file.lz4}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- 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:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`lz4 {{[-dc|--decompress --stdout]}} {{dir.tar.lz4}} | tar -xv`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Compress a file using the best compression:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`lz4 {{[-12|--best]}} {{path/to/file}}`
|