Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use LZ4 compression in Linux 3.11

LZ4 algorithm was included in Linux 3.11 kernel

Can I compress files with this algorithm without installation of additional packages?

like image 419
Quiz Avatar asked Mar 28 '14 14:03

Quiz


People also ask

How does LZ4 compression work?

The LZ4 algorithm represents the data as a series of sequences. Each sequence begins with a one-byte token that is broken into two 4-bit fields. The first field represents the number of literal bytes that are to be copied to the output.

Can 7zip open LZ4?

UPDATE: 7-Zip ZS can be used to extract lz4 files and its just like 7zip. After installation, just right click the file and choose extract option.

What is LZ4 in Linux?

LZ4 is lossless compression algorithm, providing compression speed > 500 MB/s per core, scalable with multi-cores CPU. It features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems.

How do I unzip a LZ4 file?

Similarly, lz4 -m -d can decompress multiple *. lz4 files. It's possible to opt-in to erase source files on successful compression or decompression, using --rm command. Consequently, lz4 -m --rm behaves the same as gzip .


1 Answers

This is referring to a kernel-side compression, for things like decompressing the kernel image itself. For a write-up of the benefits, and comparison with existing kernel compression algorithms, see http://events.linuxfoundation.org/sites/events/files/lcjpcojp13_klee.pdf.

For compression/decompression of files from userspace, you need the userspace utility, which can be obtained from https://code.google.com/p/lz4/

Even for use of the LZ4 compressed kernel described in the first paragraph, you still need a userspace utility to compress your kernel file.

like image 61
Peter Avatar answered Oct 03 '22 22:10

Peter