Zopfli: Difference between revisions
Derek R Bullamore (talk | contribs) Filling in 3 references using Reflinks |
|||
Line 5: | Line 5: | ||
The name ''Zöpfli'' is the [[Swiss German]] [[diminutive]] of “[[Zopf]]”, a special type of [[Hefezopf]].<ref name="name"/> |
The name ''Zöpfli'' is the [[Swiss German]] [[diminutive]] of “[[Zopf]]”, a special type of [[Hefezopf]].<ref name="name"/> |
||
== |
==Properties and use case== |
||
Zopfli can output either a raw DEFLATE data stream or DEFLATE data encapsulated into gzip or zlib formats. It can be configured to do more or less iterations than the default 15 to trade processing time for compression efficiency. |
Zopfli can output either a raw DEFLATE data stream or DEFLATE data encapsulated into gzip or zlib formats. It can be configured to do more or less iterations than the default 15 to trade processing time for compression efficiency. |
||
Line 12: | Line 12: | ||
Due to its significantly slower compression speed, zopfli is less suited for on-the-fly compression and is typically used for one-time compression of static content.<ref name="deanhume"/><ref name="theregister"/> This is typically true for [[World Wide Web|web]] content that is served with DEFLATE-based [[HTTP compression]] or web content in a DEFLATE-based file format such as PNG or [[Web Open Font Format|WOFF]] font files.<ref name="IlyaGrigorik"/> Another use case is software updates or downloads with software package files that have a [[zip (file format)|zip]]-based format such as [[Android application package]]s (APK) or [[JAR (file format)|Java Archives]] (JAR), especially over mobile connections. |
Due to its significantly slower compression speed, zopfli is less suited for on-the-fly compression and is typically used for one-time compression of static content.<ref name="deanhume"/><ref name="theregister"/> This is typically true for [[World Wide Web|web]] content that is served with DEFLATE-based [[HTTP compression]] or web content in a DEFLATE-based file format such as PNG or [[Web Open Font Format|WOFF]] font files.<ref name="IlyaGrigorik"/> Another use case is software updates or downloads with software package files that have a [[zip (file format)|zip]]-based format such as [[Android application package]]s (APK) or [[JAR (file format)|Java Archives]] (JAR), especially over mobile connections. |
||
== |
==Technology== |
||
The higher data density is achieved by using more exhaustive compression techniques. The method is based on iterating entropy modeling and a [[shortest path problem|shortest path search]] algorithm to find a low bit cost path through the [[graph (mathematics)|graph]] of all possible DEFLATE representations of the uncompressed data.<ref name="thinkdigit"/> |
The higher data density is achieved by using more exhaustive compression techniques. The method is based on iterating entropy modeling and a [[shortest path problem|shortest path search]] algorithm to find a low bit cost path through the [[graph (mathematics)|graph]] of all possible DEFLATE representations of the uncompressed data.<ref name="thinkdigit"/> |
||
Line 18: | Line 18: | ||
A reference implementation from Google was released in the form of a programming library written in [[C (programming language)|C]]. It is available as free software under the terms of version 2.0 of the [[Apache License]].<ref name="zopfli-home"/> |
A reference implementation from Google was released in the form of a programming library written in [[C (programming language)|C]]. It is available as free software under the terms of version 2.0 of the [[Apache License]].<ref name="zopfli-home"/> |
||
A [[wrapper library|wrapper]] was created for [[PHP]]: php_zopfli.<ref>https://github.com/clickalicious/ |
A [[wrapper library|wrapper]] was created for [[PHP]]: php_zopfli.<ref>https://github.com/clickalicious/php_zopfli</ref> |
||
An implementation of Zopfli in [[C Sharp (programming language)|C#]] can be found as part of the CompressSharper library ZopfliDeflater.cs.<ref>https://compresssharper.codeplex.com/SourceControl/latest#CompressSharper/CompressSharper/ |
An implementation of Zopfli in [[C Sharp (programming language)|C#]] can be found as part of the CompressSharper library ZopfliDeflater.cs.<ref>https://compresssharper.codeplex.com/SourceControl/latest#CompressSharper/CompressSharper/ZopfliDeflater.cs</ref> |
||
== History == |
== History == |
||
Line 38: | Line 38: | ||
* [[Brotli]] |
* [[Brotli]] |
||
== |
==References== |
||
{{reflist|30em|refs= |
{{reflist|colwidth=30em|refs= |
||
<ref name="GoogleDevBlog">{{cite web|url=http://googledevelopers.blogspot.com/2013/02/compress-data-more-densely-with-zopfli.html |title=Compress data more densely with Zopfli - Google Developers Blog |publisher=Googledevelopers.blogspot.com |date=2013-02-28 |accessdate=2013-05-01}}</ref> |
<ref name="GoogleDevBlog">{{cite web|url=http://googledevelopers.blogspot.com/2013/02/compress-data-more-densely-with-zopfli.html |title=Compress data more densely with Zopfli - Google Developers Blog |publisher=Googledevelopers.blogspot.com |date=2013-02-28 |accessdate=2013-05-01}}</ref> |
||
<ref name="zopfli-home"> |
<ref name="zopfli-home">https://github.com/google/zopfli</ref> |
||
<ref name="Debian"> |
<ref name="Debian">https://packages.debian.org/jessie/zopfli</ref> |
||
<ref name="name"> |
<ref name="name">http://www.heise.de/-1814414.html</ref> |
||
<ref name="lifehacker">http://www.lifehacker.com.au/2013/03/a-look-at-zopfli-googles-open-source-compression-algorithm/</ref> |
<ref name="lifehacker">{{cite web|url=http://www.lifehacker.com.au/2013/03/a-look-at-zopfli-googles-open-source-compression-algorithm/ |title=A Look At Zopfli, Google's Open Source Compression Algorithm | Lifehacker Australia |publisher=Lifehacker.com.au |date=2013-03-03 |accessdate=2015-09-29}}</ref> |
||
<ref name="zopfli-paper">{{cite article|title=Data compression using Zopfli |last=Alakuijala |first=Jyrki |last2=Vandevenne |first2=Lode |url=http://aq.hao124.eu.org/files/d7471e59937ee9ac-u-AHR0cHM6Ly96b3BmbGkUZ29vZ2xlY29kZs5jb20vZmlSZXMvRGf0YV9jb21wcmVzc2lvbl91c2lUZ19Ab3BmbGkUcGRm.pdf |accessdate=2015-09-06}}</ref> |
<ref name="zopfli-paper">{{cite article|title=Data compression using Zopfli |last=Alakuijala |first=Jyrki |last2=Vandevenne |first2=Lode |url=http://aq.hao124.eu.org/files/d7471e59937ee9ac-u-AHR0cHM6Ly96b3BmbGkUZ29vZ2xlY29kZs5jb20vZmlSZXMvRGf0YV9jb21wcmVzc2lvbl91c2lUZ19Ab3BmbGkUcGRm.pdf |accessdate=2015-09-06}}</ref> |
||
Line 54: | Line 54: | ||
<ref name="deanhume">{{cite web|url=http://deanhume.com/home/blogpost/improved-compression-ratios-using-zopfli/9125 |title=Improved Compression Ratios Using Zopfli |author=Dean Hume | date=2015-06-01 |accessdate=2015-09-06 }}</ref> |
<ref name="deanhume">{{cite web|url=http://deanhume.com/home/blogpost/improved-compression-ratios-using-zopfli/9125 |title=Improved Compression Ratios Using Zopfli |author=Dean Hume | date=2015-06-01 |accessdate=2015-09-06 }}</ref> |
||
<ref name="theregister">{{ |
<ref name="theregister">{{cite web|url=http://www.theregister.co.uk/2013/03/01/zopfli_compression/|title=Google open sources very slow compression algorithm|work=The Register| first=Simon |last=Sharwood|year=2013}}</ref> |
||
<ref name="IlyaGrigorik">{{cite web|url=https://plus.google.com/+IlyaGrigorik/posts/1sxencNkbNS |author=Ilya Grigorik |title=Google Fonts recently switched to using new Zopfli compression algorithm |publisher=Google+ |date=2014-01-09 |accessdate=2015-06-06 }}</ref> |
<ref name="IlyaGrigorik">{{cite web|url=https://plus.google.com/+IlyaGrigorik/posts/1sxencNkbNS |author=Ilya Grigorik |title=Google Fonts recently switched to using new Zopfli compression algorithm |publisher=Google+ |date=2014-01-09 |accessdate=2015-06-06 }}</ref> |
||
<ref name="thinkdigit"> |
<ref name="thinkdigit">http://www.thinkdigit.com/Internet/Zopfli-Googles-new-data-compression-algorithm_13707.html</ref> |
||
<ref name="release-1.0.0">{{cite web|url=https://github.com/google/zopfli/releases/tag/zopfli-1.0.0 |title=Release |
<ref name="release-1.0.0">{{cite web|url=https://github.com/google/zopfli/releases/tag/zopfli-1.0.0 |title=Release Zopfli-1.0.0|date=2013-04-25|publisher=Github.com |accessdate=2015-09-06 }}</ref> |
||
<ref name="ZopfliPNG">https://github.com/google/zopfli/commit/337d27f25ef15a6cf34fef2acd0613fddc411cb1</ref> |
<ref name="ZopfliPNG">{{cite web|author= |url=https://github.com/google/zopfli/commit/337d27f25ef15a6cf34fef2acd0613fddc411cb1 |title=ZopfliPNG : Google/zopfli@337d27f|publisher=Github.com |date= |accessdate=2015-09-29}}</ref> |
||
<ref name="advpng">http://advancemame.sourceforge.net/doc-advpng.html#3</ref> |
<ref name="advpng">{{cite web|author=Andrea Mazzoleni |url=http://advancemame.sourceforge.net/doc-advpng.html#3 |title=Advance Projects |publisher=Advancemame.sourceforge.net |date= |accessdate=2015-09-29}}</ref> |
||
}} |
}} |
||
Revision as of 13:44, 29 September 2015
Zopfli is a data compression algorithm that encodes data into DEFLATE, gzip and zlib formats.[1] Zopfli is regarded as the most size-efficient DEFLATE encoder available.[2] In February 2013, a reference implementation of the Zopfli algorithm was released by Google as a free software programming library under the Apache License, Version 2.0.[3] The name Zöpfli is the Swiss German diminutive of “Zopf”, a special type of Hefezopf.[4]
Properties and use case
Zopfli can output either a raw DEFLATE data stream or DEFLATE data encapsulated into gzip or zlib formats. It can be configured to do more or less iterations than the default 15 to trade processing time for compression efficiency.
Under default settings, the output of Zopfli is typically 3–8% smaller than zlib's maximum compression, but takes around 80 times longer.[3][5] The speed of decompressing Zopfli's output versus zlib's output is practically unaffected.[6]
Due to its significantly slower compression speed, zopfli is less suited for on-the-fly compression and is typically used for one-time compression of static content.[7][8] This is typically true for web content that is served with DEFLATE-based HTTP compression or web content in a DEFLATE-based file format such as PNG or WOFF font files.[9] Another use case is software updates or downloads with software package files that have a zip-based format such as Android application packages (APK) or Java Archives (JAR), especially over mobile connections.
Technology
The higher data density is achieved by using more exhaustive compression techniques. The method is based on iterating entropy modeling and a shortest path search algorithm to find a low bit cost path through the graph of all possible DEFLATE representations of the uncompressed data.[10]
Implementations
A reference implementation from Google was released in the form of a programming library written in C. It is available as free software under the terms of version 2.0 of the Apache License.[1]
A wrapper was created for PHP: php_zopfli.[11]
An implementation of Zopfli in C# can be found as part of the CompressSharper library ZopfliDeflater.cs.[12]
History
Zopfli is based on an algorithm from Jyrki Alakuijala. A reference implementation of zopfli was written by Google employees Jyrki Alakuijala and Lode Vandevenne. It was first released to the public in February 2013. Version 1.0.0 was released on April 25, 2013.[13] After several adaptations of Zopfli for PNG compression appeared on GitHub, ZopfliPNG was committed to Google's zopfli reference implementation in May 2013.[14]
The advent of Zopfli displaced Ken Silverman's KZIP as the most size-efficient DEFLATE implementation and 7-Zip's deflater as the most size-efficient freely licensed one.
PNG optimization
The Zopfli algorithm can be used to compress Portable Network Graphics (PNG) files because PNG uses a DEFLATE compression layer. There is a PNG optimization tool named ZopfliPNG from the authors of Zopfli. The Zopfli algorithm has also been integrated into other PNG compression optimization tools like advpng from the AdvanceCOMP utility suite.[15]
Silverman's KZIP-based PNG encoder PNGOUT used to be the single most size-efficient PNG encoder available. It was displaced by Zopfli-based PNG encoders and optimization tools.
See also
References
- ^ a b https://github.com/google/zopfli
- ^ https://packages.debian.org/jessie/zopfli
- ^ a b "Compress data more densely with Zopfli - Google Developers Blog". Googledevelopers.blogspot.com. 2013-02-28. Retrieved 2013-05-01.
- ^ http://www.heise.de/-1814414.html
- ^ "A Look At Zopfli, Google's Open Source Compression Algorithm | Lifehacker Australia". Lifehacker.com.au. 2013-03-03. Retrieved 2015-09-29.
- ^ Template:Cite article
- ^ Dean Hume (2015-06-01). "Improved Compression Ratios Using Zopfli". Retrieved 2015-09-06.
- ^ Sharwood, Simon (2013). "Google open sources very slow compression algorithm". The Register.
- ^ Ilya Grigorik (2014-01-09). "Google Fonts recently switched to using new Zopfli compression algorithm". Google+. Retrieved 2015-06-06.
- ^ http://www.thinkdigit.com/Internet/Zopfli-Googles-new-data-compression-algorithm_13707.html
- ^ https://github.com/clickalicious/php_zopfli
- ^ https://compresssharper.codeplex.com/SourceControl/latest#CompressSharper/CompressSharper/ZopfliDeflater.cs
- ^ "Release Zopfli-1.0.0". Github.com. 2013-04-25. Retrieved 2015-09-06.
- ^ "ZopfliPNG : Google/zopfli@337d27f". Github.com. Retrieved 2015-09-29.
- ^ Andrea Mazzoleni. "Advance Projects". Advancemame.sourceforge.net. Retrieved 2015-09-29.
External links
- Project page on GitHub
- Google's Zopfli Compression Algorithm: Extract higher performance from your compressed files – TechRepublic.com