For faster navigation, this Iframe is preloading the Wikiwand page for LZ4.

LZ4

LZ4
原作者Yann Collet
开发者Yann Collet
首次发布2011年4月24日 (2011-04-24)
当前版本
  • 1.9.4 (2022年8月16日;稳定版本)[1]
编辑维基数据链接
原始码库 编辑维基数据链接
编程语言C
操作系统跨平台
平台可移植
类型数据压缩
许可协议Simplified BSD License
网站lz4.org 编辑维基数据链接

LZ4是一种无损数据压缩算法,着重于压缩和解压缩速度,它属于面向字节的LZ77压缩方案家族。

特征

LZ4 算法目标是提供速度和压缩比的良好权衡,压缩率比 LZO 差,也比 Deflate 类型的算法差,但是 LZ4 压缩速度与 LZO 相似,比 DEFLATE 快数倍,而解压缩速度则明显快于 LZO。[3]

设计

压缩可以在流或者块中进行。在查找最佳匹配时投入更多努力可达到更高的压缩率,这样的结果是更小的输出和更快的解压缩速度。

实现

Yann Collet使用C语言制成的参考实现发布在BSD许可证之下。此算法已有多种语言的移植绑定,包括JavaC#Python等。[4]像是Hadoop等数据库使用此算法进行快速压缩。LZ4也在Linux内核 3.11中被原生实现。[5]ZFS文件系统的FreeBSDIllumos、ZFS on Linux,以及ZFS-OSX实现都支持LZ4算法进行即时压缩。[6][7][8][9]Linux从3.19-rc1开始在SquashFS中支持LZ4。[10]Yann Collet也在较新版的Zstd压缩软件中实现了LZ4。

参考资料

  1. ^ Release v1.9.4. 
  2. ^ Releases - lz4/lz4. [2022-08-15]. (原始内容存档于2021-01-29) –通过GitHub. 
  3. ^ Michael Larabel. Support For Compressing The Linux Kernel With LZ4. Phoronix. 2013-01-28 [2015-08-28]. (原始内容存档于2020-11-27). 
  4. ^ GitHub上的Extremely Fast Compression algorithm http://www.lz4.org
  5. ^ Jonathan Corbet. Kernel development. LWN.net. 2013-07-19 [2015-08-28]. (原始内容存档于2017-12-15). 
  6. ^ FreeBSD 9.2-RELEASE Release Notes. FreeBSD. 2013-11-13 [2015-08-28]. (原始内容存档于2020-11-12). 
  7. ^ LZ4 Compression. illumos. [2015-08-28]. (原始内容存档于2018-10-09). 
  8. ^ GitHub上的Illumos #3035 LZ4 compression support in ZFS and GRUB
  9. ^ Features: lz4 compression. OpenZFS. [2015-08-28]. (原始内容存档于2020-04-25). 
  10. ^ Phillip Lougher. Squashfs: Add LZ4 compression configuration option. 2014-11-27 [2015-08-28]. 

外部链接

{{bottomLinkPreText}} {{bottomLinkText}}
LZ4
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?