压缩算法总结

压缩算法总结

经常记不住性能特点,数据来源https://linuxreviews.org/Comparison_of_Compression_Algorithms

algorithm time size binary parameters info
algorithm time size binary parameters info
none 0m0.934s 939M just tar cf tar itself is an archiving tool, you do not need to compress the archives
gzip 0m23.502s 177M gzip cfz
gzip 0m3.132s 177M pigz c -Ipigz -f pigz 2.4
bzip2 1m0.798s 134M bzip2 cfj Standard bzip2 will only use one core (at 100%)
bzip2 0m9.091s 135M pbzip2 c -Ipbzip2 -f Parallel bzip2. RAM usage topped out at about 900 MiB RAM.
lz4 0m3.914s 287M lz4 c -I”lz4” -f Really fast but the resulting archive is barely compressed. Worst compression king.
lz4 0m56.506s 207M lz4 c -I”lz4 -12” -f Supports levels -[1-12].Uses 1 core, does not appear to be any multi-threaded variant(?)
lzip 4m42.017s 116M lzip c –lzip -f v1.21. Standard lzip will only use one core (at 100%). Very slow.
lzip 0m42.542s 118M plzip c -Iplzip -f plzip 1.8 (Parallel lzip), default level -6
lzip 1m39.697s 110M plzip c -I”plzip -9” -f Parallel lzip at best compression -9. plzip process used 5.1 GiB RAM at its maximum.
xz 5m2.952s 114M xz cfJ Standard xz will only use one core (at 100%). Unbearably slow.
xz 0m53.569s 115M pxz c -Ipxz -f Parallel PXZ 4.999.9beta. Process used 1.4 GiB RAM at its maximum.
xz 1m33.441s 110M pxz c -I”pxz -9” -f Parallel PXZ 4.999.9beta using its best possible compression. pxz process topped out at 3.5 GiB resident.
zstd 0m3.034s 167M zstd c –zstd -f zstd uses 1 core if it is no told otherwise with -T# where # is a thread number and 0 means all cores (not all threads)
zstd 1m18.238s 117M zstd c -I”zstd -19 -T0” -f -19 gives the best possible compression, -T0 utilizes all cores.

PK

压缩体积
压缩
解压缩

打赏
  • 版权声明: 本博客所有文章除特别声明外,均采用 Apache License 2.0 许可协议。转载请注明出处!

扫一扫,分享到微信

微信分享二维码
  • © 2020-2021 一潭清泓
  • Powered by Hexo Theme Ayer
  • PV: UV:

请我喝杯咖啡吧~

支付宝
微信