Zopfli

from Wikipedia, the free encyclopedia
Zopfli
Basic data

developer Jyrki Alakuijala, Lode Vandevenne
Current  version 1.0.3
(November 2019)
operating system cross-platform
programming language C.
License Apache license 2.0
https://github.com/google/zopfli

Zopfli is a data compression - algorithm , the data in the non Deflate format encoding (known from the ZIP file format and zlib ). Zopfli is considered to be the most file size efficient deflate encoder available. A reference implementation has been published as a free program library . Zöpfli is the Swiss German diminutive for plait , a special unsweetened type of yeast plait . Another algorithm named after a Swiss pastry is Brotli .

Properties and areas of application

Zopfli can output either raw deflate data or encapsulated in gzip or zlib format. It can be set to run more or less than the preset 15 iterations in order to weigh computation time against compression density.

With the default setting, it usually achieves about 5% better compression density than zlib with the same data, but it takes about 80 times more time to do so. The De compression speed remains of it virtually untouched.

It is therefore much less suitable for on-demand compression and pays off when data is compressed once and delivered sufficiently often over a network, for example. This usually applies to static web content that is usually delivered with deflate-based HTTP compression or in a deflate-based file format such as PNG or WOFF font files. (Until recently, most web clients only supported deflate or gzip and no more advanced formats such as Brotli or xz , but the Brotli algorithm is now supported by almost all major browsers). Another field of application 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 via mobile Internet connections.

technology

The higher data density is achieved through the use of more thorough compression techniques. The method is based on iterating entropy modeling and a shortest path search to find a path with low bit costs through the graph of all possible deflate representations.

Implementations

There is a reference implementation by the authors in the form of a program library written in C. It is also available as free software in source code under the conditions of version 2.0 of the permissive Apache license .

With php_zopfli there is a first implementation in PHP . Because of the gzip / zlib-compatible data compression, this library can also be used for the compression of data prior to delivery to clients analogous to gzencode ().

An implementation of Zopfli in C # can be found as part of the CompressSharper library ZopfliDeflater.cs .

history

Zopfli is based on an algorithm by Jyrki Alakuijala. Zopfli was developed by Google employees Jyrki Alakuijala and Lode Vandevenne as a side project in their "20 percent time" and implemented in a program library. It was first published in March 2013. An official version 1.0.0 was released on April 25, 2013. The appearance of Zopfli ousted Ken Silverman's KZIP as the most file-size-efficient deflate implementation and 7-Zips Deflater as the most file-size - efficient freely licensed.

After several Zopfli adaptations for PNG appeared on GitHub , the PNG optimizer ZopfliPNG has been in the current Git version of Zopfli since May 2013 .

PNG optimization

The Zopfli algorithm can be used to compress PNG files, as the PNG format uses a deflate compression layer. There is a PNG optimization tool called ZopfliPNG by the Zopfli authors. The Zopfli algorithm has also been integrated into other PNG optimization tools such as advpng from the AdvanceCOMP collection.

Silverman's KZIP-based PNG encoder PNGOUT was the single tool that created the smallest of PNG files. It is surpassed by Zopfli-based PNG encoders and optimization tools.

Web links

Individual evidence

  1. Compress data more densely with Zopfli - Google Developers Blog . Googledevelopers.blogspot.com. February 28, 2013. Retrieved May 1, 2013.
  2. zopfli - Zopfli Compression Algorithm - Google Project Hosting . Code.google.com. Retrieved May 1, 2013.
  3. Description of the Debian package from Zopfli , debian.org (English)
  4. Zopfli: New compression library from Google , Alexander Neumann, heise Developer , March 1, 2013
  5. A Look At Zopfli, Google's Open Source Compression Algorithm , lifehacker.com.au, March 2013 (English)
  6. Simon Sharwood: Google open sources very slow compression algorithm . In: The Register . 2013.
  7. Can I use ... Support tables for HTML5, CSS3, etc. Accessed December 20, 2019 .
  8. ThinkDigit: Zopfli: Google's new data compression algorithm (English)
  9. clickalicious / php_zopfli ( Memento from April 11, 2013 in the web archive archive.today ), GitHub (English)
  10. ZopfliDeflater.cs , compresssharper.codeplex.com (English)
  11. google / zopfli google / zopfli , GitHub (English)
  12. Documentation of the AdvanceSCAN advpng utility , advancemame.sourceforge.net (English)