digplanet beta 1: Athena
Share digplanet:

Agriculture

Applied sciences

Arts

Belief

Business

Chronology

Culture

Education

Environment

Geography

Health

History

Humanities

Language

Law

Life

Mathematics

Nature

People

Politics

Science

Society

Technology

zlib
zlib logo
Initial release 1 May 1995 (1995-05-01)
Stable release 1.2.8 / 28 April 2013; 2 days ago (2013-04-28)
Written in C
Operating system Cross-platform
Type Data compression
License zlib license
Website zlib.net

zlib is a software library used for data compression. zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. zlib is also a crucial component of many software platforms including Linux, Mac OS X, and iOS. It has also been used in gaming consoles such as the PlayStation 3, Wii, and Xbox 360.

The first public version of zlib, 0.9, was released on 1 May 1995 and was originally intended for use with the libpng image library. It is free software, distributed under the zlib license.

Contents

Capabilities [edit]

Encapsulation [edit]

zlib compressed data is typically written with a gzip or a zlib wrapper. The wrapper encapsulates the raw DEFLATE data by adding a header and trailer. This provides stream identification and error detection that are not provided by the raw DEFLATE data.

The gzip header is larger than the zlib header, as it stores a file name and other file system information. This is the header format used in the ubiquitous gzip file format.

Algorithm [edit]

As of February 2010, zlib only supports one algorithm called DEFLATE, that is a variation of LZ77 (Lempel–Ziv 1977). This algorithm provides good compression on a wide variety of data with minimal use of system resources. This is also the algorithm used in the ZIP archive format.

The header makes allowance for other algorithms, but none are currently implemented.

Resource use [edit]

zlib provides facilities for control of processor and memory use. A compression level value may be supplied that trades-off speed with compression. There are also facilities for conserving memory. These are probably only useful in restricted memory environments such as some embedded systems.

Strategy [edit]

The compression can be optimized for specific types of data. If you are using the library to always compress specific types of data, then using a specific strategy may improve compression and performance. For example, if your data contains long lengths of repeated bytes, the RLE (run-length encoding) strategy may give good results at higher speed. For general data, the default strategy is preferred.

Error handling [edit]

Errors in compressed data may be detected and skipped. Further, if "full-flush" points are written to the compressed stream, then corrupt data can be skipped, and the decompression will resynchronise at the next flush point - although no error recovery of the corrupt data is provided. Full-flush points are useful for large data streams on unreliable channels, where some data loss is unimportant, such as in some multimedia applications. However, creating many flush points can affect the speed as well as amount (ratio) of compression.

Data length [edit]

There is no limit to the length of data that can be compressed or decompressed. Repeated calls to the library allow an unlimited numbers of blocks of data to be handled. Some ancillary code (counters) may suffer from overflow for long data streams, but this does not affect the actual compression or decompression.

When compressing a long (or infinite) data stream, it would be advisable to write regular full-flush points.

Applications [edit]

Today, zlib is something of a de facto standard, to the point that zlib and DEFLATE are often used interchangeably in standards documents, with thousands of applications relying on it for compression, either directly or indirectly.[1] These include:

  • The Linux kernel itself, where zlib is used to implement compressed network protocols, compressed file systems and to decompress the kernel image itself at boot time.
  • libpng, the reference implementation for the PNG image format, which specifies DEFLATE as the stream compression for its bitmap data.
  • libwww, an API for Web applications like Web browsers.
  • The Apache HTTP server, which uses zlib to implement HTTP/1.1.
  • The OpenSSH client and server, which rely on zlib to perform the optional compression offered by the Secure Shell protocol.
  • The OpenSSL and GnuTLS security libraries, which can optionally use zlib to compress TLS connections.
  • The FFmpeg multimedia library, which uses zlib to read and write the DEFLATE-compressed parts of stream formats such as Matroska.
  • The rsync remote file synchronizer, which uses zlib to implement optional protocol compression.
  • The dpkg and RPM package managers, which use zlib to unpack files from compressed software packages.
  • The Subversion and CVS version control systems, which use zlib to compress traffic to and from remote repositories.
  • The Git version control system that uses zlib to store the contents of its data objects (blobs, trees, commits and tags).
  • The PostgreSQL RDBMS that uses zlib with custom dump format (pg_dump -Fc) for database backups.
  • The class System.IO.Compression.DeflateStream of the Microsoft .NET Framework 2.0 and higher.[2]

zlib is also used in many embedded devices such as the Apple Inc. iPhone and Sony PlayStation 3, because the code is portable, liberally licensed, and has a relatively small memory footprint.

See also [edit]

References [edit]

  1. ^ Gailly, Jean-loup; Adler, Mark (2002-04-18), zlib Applications 
  2. ^ System.IO.Compression.DeflateStream MSDN Library

External links [edit]

  • Official website
  • RFC 1950—ZLIB Compressed Data Format
  • RFC 1951—DEFLATE Compressed Data Format
  • RFC 1952—GZIP file format
  • miniz.c, a single-source-file, public-domain implementation of the zlib API for embedded and memory-limited use cases

Original courtesy of Wikipedia: http://en.wikipedia.org/wiki/Zlib — Please support Wikipedia.
A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia.
673 videos foundNext > 

YAFFS with 'zlib' compression

Demonstration with the option 'zlib compression'

WordPress Tutorial: Enable PHP5 fastcgi and ZLIB compression on Bluehost.avi

Boosting WordPress speed on bluehost using PHP5 Fast CGI and enabling Zlib compression.

zlib.dll Review - How to Fix zlib.dll Error

Guide: zlib.dll Review - How to Fix zlib.dll Error: zlib data compression library, v1.1.3.0. If you encountered the above dll error when you were trying unin...

Zlibc Decompression GUI Tutorial

This is a quick tutorial on how to make a GUI for the CLI program zlibc.exe As a fore-note I am not a professional, if anything I am a beginner and am still ...

Fix Zlib.dll error instantly in your Windows system

http://www.fixerrors.org/uninstalling-putty-exe-errors-how-to-delete-putty-exe-error-from-computers Zlib.dll error is a serious system error wghich can cause...

ePSXe [Deutsch] - "zlib.dll" und "Missing render-texture extension!"

zlib1.dll /// Missing render-texture extension! /// No pixel format available! ... und wie ihr euch mit diesen bösen Gemeinheiten des Playstation Emulators e...

Ruby Zlib GVL release patch demonstration

A demonstration of a patch to Zlib that allows parallel processing of zlib streams. See https://bugs.ruby-lang.org/issues/6615 for the patch.

Tutorial Deutsch - ePSXe zlib dll not found

ePSXe zlib dll not found http://forums.ngemu.com/epsxe-discussion/106182-zlib1-dll-not-found-fix-here.html.

zlib 라이브러리- inflate 예제 1

zlib 라이브러리- inflate 예제 1.

CS:S | DEAGLEZ by Zlib

JUST TESTING COLOURS. FIRST FRAG by BLEIDI SECOND by ME! http://www.youtube.com/user/Zlib69 THIRD by SANTEX http://www.youtube.com/user/Santex1000 AND I DON'T KNOW WHY I'M DOING SO...

673 videos foundNext > 

64 news items

 
GameDev.net
Wed, 08 May 2013 15:00:43 -0700

I think zlib does that but I am not sure if it is not a little too old. And I know that it is impossible to avoid people from hacking your resources but I wanted a packfile that could not be opened in a simple Winrar or Winzip. If you could recomend ...

Globe and Mail

PlayStation Universe
Wed, 24 Apr 2013 10:41:34 -0700

Another way the the PS4 team is helping boost the performance of games on Blu-Ray is using a type of compression called zlib for the data on the disc. This will assist in the console's on-the-fly decoding of disc-based games. "As a minimum, our vision ...

ExtremeTech

ExtremeTech
Mon, 06 May 2013 06:27:45 -0700

Because servers don't need customized SoCs with huge paths to a large main memory pool that's shared between CPU and GPU with fixed function blocks for things like zlib and DSP. Many of the tasks Cell was excellent at are now better performed on the ...

ExtremeTech

ExtremeTech
Wed, 24 Apr 2013 10:02:49 -0700

That's just wrong I'm afraid, or heavily threaded tasks AMD is much better value, for example: http://www.guru3d.com/articles_pages/amd_fx_8350_processor_review,15.html. In the Zlib test for example the AMD chip beat much higher priced intel chips. Jml ...

GIGAZINE

GIGAZINE
Tue, 21 May 2013 20:43:32 -0700

アップロードされる際に自動的にPNG形式画像のtEXtチャンク内に格納されるわけですが、そのままではファイルサイズがオリジナルの2倍から4倍にふくれあがってしまうため、zlibを使って圧縮してから埋め込んでいます。Flickrにはアップロードされた画像は自動的にリサイズ ...
 
InfoQ: 时刻关注企业软件开发领域的变化与创新
Wed, 15 May 2013 11:42:22 -0700

Zlib(新加入)扩展是很多PHP项目中的核心部分,是因为其支持gzip压缩。Zlib现在也是Phalanger中的一部分。 由于这些扩展类库都是由C#实现,理论上可以和其他基于.NET的语言一起使用。由于是基于Apache协议发布的,开发 ...
 
Golem.de
Thu, 16 May 2013 23:55:01 -0700

Während die native Version der zlib rund fünf- bis sechsmal schneller ist als die Emscripten-Javascript-Version unter Spidermonkey und v8, reduziert sich der Geschwindigkeitsvorteil des nativen Codes im Vergleich mit Odinmonkey auf das 1,61fache.
 
中文IT技术网站
Tue, 07 May 2013 08:54:12 -0700

他们找到了一个图片处理应用中的瓶颈,它是zlib库中的一个程序锁,是用C写成的。他们用Erlang重写了它,用Erlang替换了C代码。 这真是不可思议,C程序本应更快,事实也是,但它却有个同步锁。Erlang程序相比之下要慢,但没 ...
Loading

Oops, we seem to be having trouble contacting Twitter

Talk About Zlib

You can talk about Zlib with people all over the world in our discussions.

Support Wikipedia

A portion of the proceeds from advertising on Digplanet goes to supporting Wikipedia. Please add your support for Wikipedia!