LZ4
From Just Solve the File Format Problem
(Difference between revisions)
(Added DWARFS as a user of LZ4.) |
m (→Resources: updated link for 'Debunking the LZ4 "20 years old bug" myth' to Internet Archive copy, as the blog entry no longer exists.) |
||
(One intermediate revision by one user not shown) | |||
Line 5: | Line 5: | ||
|wikidata={{wikidata|Q15624241}} (Compression algorithm)<br />{{wikidata|Q28770292}} (file format) | |wikidata={{wikidata|Q15624241}} (Compression algorithm)<br />{{wikidata|Q28770292}} (file format) | ||
|compression=lossless, mandatory | |compression=lossless, mandatory | ||
− | |magic=02 21 4c 18 ( | + | |magic=[https://github.com/file/file/blob/master/magic/Magdir/compress#L304 02 21 4c 18] (v0.1-v0.9)<br />[https://github.com/file/file/blob/master/magic/Magdir/compress#L302 03 21 4c 18] (v1.0-v1.3)<br />[https://github.com/file/file/blob/master/magic/Magdir/compress#L298 04 22 4d 18] (v1.4+) |
|released=2011 | |released=2011 | ||
}} | }} | ||
Line 18: | Line 18: | ||
== Identification == | == Identification == | ||
− | + | * LZ4 (v1.4+) compressed files begin with signature bytes {{magic|04 22 4d 18}}. | |
− | + | * LZ4 (v1.0-v1.3) compressed files begin with signature bytes {{magic|03 21 4c 18}}. | |
− | + | * LZ4 (v0.1-v0.9) compressed files begin with signature bytes {{magic|02 21 4c 18}}. | |
== Resources == | == Resources == | ||
Line 27: | Line 27: | ||
* [https://fastcompression.blogspot.com/2011/05/lz4-explained.html LZ4 explained] | * [https://fastcompression.blogspot.com/2011/05/lz4-explained.html LZ4 explained] | ||
* [https://ticki.github.io/blog/how-lz4-works/ How LZ4 works] | * [https://ticki.github.io/blog/how-lz4-works/ How LZ4 works] | ||
− | * [http://blog.securitymouse.com/2014/06/raising-lazarus-20-year-old-bug-that.html Raising Lazarus - The 20 Year Old Bug that Went to Mars] vs. [http://fastcompression.blogspot.com/2014/06/debunking-lz4-20-years-old-bug-myth.html Debunking the LZ4 "20 years old bug" myth] | + | * [http://blog.securitymouse.com/2014/06/raising-lazarus-20-year-old-bug-that.html Raising Lazarus - The 20 Year Old Bug that Went to Mars] vs. [https://web.archive.org/web/20140627022047/http://fastcompression.blogspot.com/2014/06/debunking-lz4-20-years-old-bug-myth.html Debunking the LZ4 "20 years old bug" myth - Internet Archive copy] |
== References == | == References == | ||
<references/> | <references/> |
Latest revision as of 11:32, 16 August 2025
LZ4 is a lossless data compression algorithm and compressed data format. It is designed to support very fast compression.
In Linux, LZ4 appears as one of the many compression format for:
- vmlinuz[1]
- initramfs[2][3][4]
-
squashfs-tools
[5] - zram[6] - Compressed RAM-based block devices.
- DWARFS[7]
[edit] Identification
- LZ4 (v1.4+) compressed files begin with signature bytes
04 22 4d 18
. - LZ4 (v1.0-v1.3) compressed files begin with signature bytes
03 21 4c 18
. - LZ4 (v0.1-v0.9) compressed files begin with signature bytes
02 21 4c 18
.
[edit] Resources
- LZ4 compression algorithm on Wikipedia
- LZ4 website
- LZ4 explained
- How LZ4 works
- Raising Lazarus - The 20 Year Old Bug that Went to Mars vs. Debunking the LZ4 "20 years old bug" myth - Internet Archive copy
[edit] References
- ↑ extract-vmlinux shell script (line 56) - Linus Torvalds' kernel - GitHub
- ↑ dracut.conf.5.adoc - dracut-ng manual pages - GitHub
- ↑ mkinitcpio.conf (lines 61-67) - mkinitcpio - Arch Linux GitLab
- ↑ manpage.md (line 57) - booster - GitHub
- ↑ compressor.c (lines 31-77) - squashfs-tools - GitHub
- ↑ 2) Select compression algorithm - zram: Compressed RAM-based block devices -- The Linux Kernel documentation
- ↑ lz4.cpp - DWARFS - GitHub