Zopfli

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
Zopfli Archive
Initial release February 2013 (2013-02)
Stable release 1.0.1
Written in C
Operating system Cross-platform
Type File archive, data compression
License Apache License 2.0
Website {{#property:P856}}

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 unsweetened 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]

ZopfliPNG is currently the most size-efficient PNG optimizer available.

See also

References

  1. 1.0 1.1 Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. 3.0 3.1 Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.
  5. Lua error in package.lua at line 80: module 'strict' not found.
  6. Lua error in package.lua at line 80: module 'strict' not found.
  7. Lua error in package.lua at line 80: module 'strict' not found.
  8. Lua error in package.lua at line 80: module 'strict' not found.
  9. Lua error in package.lua at line 80: module 'strict' not found.
  10. Lua error in package.lua at line 80: module 'strict' not found.
  11. Lua error in package.lua at line 80: module 'strict' not found.
  12. Lua error in package.lua at line 80: module 'strict' not found.
  13. Lua error in package.lua at line 80: module 'strict' not found.
  14. Lua error in package.lua at line 80: module 'strict' not found.
  15. Lua error in package.lua at line 80: module 'strict' not found.

External links