2018-05-24 22:53:42 +01:00
|
|
|
# lz4
|
|
|
|
|
|
|
|
> Compress or decompress .lz4 files.
|
2019-06-05 08:55:58 +01:00
|
|
|
> More information: <https://github.com/lz4/lz4>.
|
2018-05-24 22:53:42 +01:00
|
|
|
|
|
|
|
- Compress a file:
|
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`lz4 {{path/to/file}}`
|
2018-05-24 22:53:42 +01:00
|
|
|
|
|
|
|
- Decompress a file:
|
|
|
|
|
|
|
|
`lz4 -d {{file.lz4}}`
|
|
|
|
|
2022-12-04 07:53:34 +00:00
|
|
|
- Decompress a file and write to `stdout`:
|
2018-05-24 22:53:42 +01:00
|
|
|
|
|
|
|
`lz4 -dc {{file.lz4}}`
|
|
|
|
|
|
|
|
- Package and compress a directory and its contents:
|
|
|
|
|
2020-10-28 17:19:43 +00:00
|
|
|
`tar cvf - {{path/to/directory}} | lz4 - {{dir.tar.lz4}}`
|
2018-05-24 22:53:42 +01:00
|
|
|
|
|
|
|
- Decompress and unpack a directory and its contents:
|
|
|
|
|
2022-10-24 12:16:02 +01:00
|
|
|
`lz4 -dc {{dir.tar.lz4}} | tar -xv`
|
2018-05-24 22:53:42 +01:00
|
|
|
|
|
|
|
- Compress a file using the best compression:
|
|
|
|
|
2022-12-04 09:12:49 +00:00
|
|
|
`lz4 -9 {{path/to/file}}`
|