Zlib

zlib
Initial release1 May 1995 (1995-05-01)
Stable release
1.3.1[1] / 22 January 2024; 10 months ago (22 January 2024)
Repository
Written inC
Operating systemCross-platform
TypeData compression
Licensezlib License
Websitezlib.net

zlib (/ˈzlɪb/ or "zeta-lib", /ˈztəˌlɪb/)[2][3] is a software library used for data compression as well as a data format.[4] 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, macOS, and iOS. It has also been used in gaming consoles such as the PlayStation 4, PlayStation 3, Wii U, Wii, Xbox One 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.

Capabilities

Encapsulation

Raw DEFLATE compressed data (RFC 1951)[5] are typically written with a zlib or gzip wrapper encapsulating the data, by adding a header and footer. This provides stream identification and error detection that are not provided by the raw DEFLATE data.

The zlib wrapper (RFC 1950)[4] is smaller than the gzip wrapper (RFC 1952),[6] as the latter stores a file name and other file system information.

Algorithm

As of September 2018, zlib only supports one algorithm, called DEFLATE, which uses a combination of a variation of LZ77 (Lempel–Ziv 1977) and Huffman coding.[7] 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

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

Strategy

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

Error handling

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 resynchronize 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 the amount (ratio) of compression.

Data length

There is no limit to the length of data that can be compressed or decompressed. Repeated calls to the library allow an unlimited number 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 is advisable to write regular full-flush points.

Applications

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.[8] These include:

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

Forks

A commonly used library built on an old codebase, zlib is also frequently forked by third-parties that claim improvements to this library:

See also

References

  1. ^ Adler, Mark (22 January 2024). "[Zlib-announce] zlib 1.3.1 released". Retrieved 23 January 2024.
  2. ^ Stutz, Michael (October 22, 2004). The Linux Cookbook, 2nd Edition: Tips and Techniques for Everyday Use. No Starch Press. ISBN 9781593270315. Archived from the original on January 25, 2023. Retrieved October 28, 2021 – via Google Books.
  3. ^ Loki Software; Hall, John R. (October 22, 2001). Programming Linux Games. No Starch Press. ISBN 9781886411494. Archived from the original on July 11, 2024. Retrieved October 28, 2021 – via Google Books.
  4. ^ a b RFC 1950. doi:10.17487/RFC1950.
  5. ^ RFC 1951. doi:10.17487/RFC1951.
  6. ^ RFC 1952. doi:10.17487/RFC1952.
  7. ^ RFC 1951. doi:10.17487/RFC1951.
  8. ^ Gailly, Jean-loup; Adler, Mark (2002-04-18), zlib Applications, archived from the original on 2019-06-10, retrieved 2007-12-09
  9. ^ "c++ - Why does cURL use zlib?". Stack Overflow.
  10. ^ "ORCFile in HDP 2: Better Compression, Better Performance". 6 September 2013. Archived from the original on 6 August 2020. Retrieved 16 May 2020.
  11. ^ System.IO.Compression.DeflateStream Archived 2016-02-06 at the Wayback Machine. MSDN Library.
  12. ^ zlib-flate(1) – Debian General Commands Manual
  13. ^ "qpdf". Archived from the original on 2024-07-11. Retrieved 2021-03-28.
  14. ^ "MySQL :: MySQL 8.0 Reference Manual :: 15.9.1.5 How Compression Works for InnoDB Tables". dev.mysql.com. Archived from the original on 2021-08-01. Retrieved 2021-07-14.
  15. ^ "github Intel ZLIB". github. 25 January 2024. Archived from the original on 25 January 2024. Retrieved 25 January 2024.
  16. ^ "Fighting Cancer: The Unexpected Benefit Of Open Sourcing Our Code". The Cloudflare Blog. 8 July 2015. Archived from the original on 21 September 2019. Retrieved 18 January 2020.
  17. ^ Rosbach, HK (24 February 2023). "zlib-ng/zlib-ng: zlib replacement with optimizations for "next generation" systems". GitHub. zlib-ng. Archived from the original on 20 April 2020. Retrieved 18 January 2020.

Read other articles:

Juego de niños Programa de televisiónPresentado por Amparo Soler Leal (1988)Tina Sainz (1989)Ignacio Salas (1989-1990)Xavier Sardà (1990-1992; 2019)Protagonistas 6.ª temporada José Corbacho (2019)Juan Carlos Ortega (2019)Tema principal Pythagoras' Trousers(compuesto por Penguin Cafe Orchestra)N.º de temporadas 6 director = Miquel Obiols Prat (1.ª a 5.ª)Xavier Sardá (6.ª temporada) realización = Marcelí Gili, Amparo Solis productor = Fernando G.Tejedor (1.ª a 5.ª)N.º de episodio...

 

 

Tati GabrielleLahirTatiana Gabrielle Hobson25 Januari 1996 (umur 28)San Francisco, California, Amerika SerikatPekerjaanAktrisTahun aktif2014–sekarang Tatiana Gabrielle Hobson (lahir 25 Januari 1996) adalah seorang aktris asal Amerika Serikat. Dia dikenal karena perannya sebagai Gaia di serial televisi fiksi ilmiah The CW, The 100, sebagai Prudence di serial Netflix, Chilling Adventures of Sabrina, sebagai Marienne Bellamy di serial Netflix, You, serta mengisi suara Willow Park di...

 

 

جامعة محمد السادس لعلوم الصحة شعار جامعة محمد السادس لعلوم الصحة معلومات التأسيس 2014 النوع جامعة غير ربحية لغات التدريس الفرنسية الموقع الجغرافي إحداثيات 33°35′10″N 7°37′38″W / 33.586004514067°N 7.6272314576732°W / 33.586004514067; -7.6272314576732[1]  المدينة الدار البيضاء المكان الدار �...

View upward from the surface of the Earth This article is about Earth's sky. For other skies, see extraterrestrial skies. For other uses, see Sky (disambiguation). View of the night sky in July from Earth The day's blue sky, clouds and the Moon The sky is an unobstructed view upward from the surface of the Earth. It includes the atmosphere and outer space. It may also be considered a place between the ground and outer space, thus distinct from outer space. In the field of astronomy, the sky i...

 

 

American actress, comedian and screenwriter (born 1995) This article's lead section may be too short to adequately summarize the key points. Please consider expanding the lead to provide an accessible overview of all important aspects of the article. (April 2024) Rachel SennottSennott in 2022BornRachel Anne Sennott (1995-09-19) September 19, 1995 (age 28)Simsbury, Connecticut, U.S.Alma materNew York University (BFA)OccupationsActresscomedianscreenwriterYears active2016–presen...

 

 

1938 book by Ulrich Alexander Boschwitz The Passenger AuthorUlrich Alexander BoschwitzTranslatorPhilip BoehmCountryGermanyLanguageGermanPublisherHenry Holt and Company[1]Publication date1938 (Germany), 1939 (United States), 1940 (United Kingdom)Pages288ISBN9781250317148 The Passenger is a 1938 novel by Ulrich Alexander Boschwitz published by Henry Holt under the imprint Metropolitan Books. Initially unsuccessful, its 2021 re-release gained critical acclaim for its ability to capture ...

追晉陸軍二級上將趙家驤將軍个人资料出生1910年 大清河南省衛輝府汲縣逝世1958年8月23日(1958歲—08—23)(47—48歲) † 中華民國福建省金門縣国籍 中華民國政党 中國國民黨获奖 青天白日勳章(追贈)军事背景效忠 中華民國服役 國民革命軍 中華民國陸軍服役时间1924年-1958年军衔 二級上將 (追晉)部队四十七師指挥東北剿匪總司令部參謀長陸軍�...

 

 

Questa voce o sezione sull'argomento videogiochi a piattaforme non cita le fonti necessarie o quelle presenti sono insufficienti. Puoi migliorare questa voce aggiungendo citazioni da fonti attendibili secondo le linee guida sull'uso delle fonti. Disney's HerculesvideogiocoSchermata della versione PlayStationPiattaformaPlayStation, Microsoft Windows, Game Boy Data di pubblicazione luglio 1997 GenerePiattaforme, avventura dinamica, hack and slash OrigineRegno Unito Svilupp...

 

 

Non-profit organisation in South Africa Africa’s Young EntrepreneursFounded2010FounderSummy Smart FrancisTypeNonprofit organizationHeadquartersJohannesburg, South AfricaArea served AfricaMembers 12 millionKey peopleSummy Smart Francis (president)Ibada Ahmed (vice president)Folorunsho Alakija (chief matron)Asiwaju Bola Tinubu (chief patron)Websiteayeorganization.com Africa's Young Entrepreneurs Organization (A.Y.E.) is the foremost[1] entrepreneurship organization in Africa. A.Y.E un...

Municipality and city in Jalisco, MexicoJalostotitlánMunicipality and city SealEtymology: place of sandy caves; place of caves from which sand is drawn in NahuatlNickname(s): El Corazón de los Altos de Jalisco, JalosMotto: Prudencia-union-fortalezaLocation in JaliscoJalostotitlánLocation in MexicoCoordinates: 21°10′N 102°28′W / 21.167°N 102.467°W / 21.167; -102.467Country MexicoStateJaliscoMunicipalityJalostotitlánregionAltos Surfounded1530ga...

 

 

Handball referees Bernd and Reiner MetheBernd Methe with Reiner MetheBorn(1964-06-01)1 June 1964Died11 November 2011(2011-11-11) (aged 47)Between Empfingen and Haigerloch, Baden-WürttembergNationalityGermanOccupationHandball refereeYears active1988–2011 Bernd and Reiner Methe (1 June 1964 – 11 November 2011) were German twins and handball referees. They refereed for the German Handball-Bundesliga and in international competitions until their deaths in a car crash in November 20...

 

 

PT Bank BTPN Syariah TbkSebelumnyaPT Bank Purba Danarta (1991-2009)PT Bank Sahabat Purba Danarta (2009-2014)PT Bank Tabungan Pensiunan Nasional Syariah (2014-2020)JenisPerseroan terbatasKode emitenIDX: BTPSIndustriJasa keuanganDidirikan7 Maret 1991; 33 tahun lalu (1991-03-07)KantorpusatJakarta, IndonesiaWilayah operasiIndonesiaTokohkunciHadi Wibowo[1](Direktur Utama)Kemal Azis Stamboel[2](Komisaris Utama)ProdukTabunganGiroDepositoKreditMerekTepatDayaPendapatanRp 4,037 tri...

Two or more species influencing each other's evolution The pollinating wasp Dasyscolia ciliata in pseudocopulation with a flower of Ophrys speculum[1] In biology, coevolution occurs when two or more species reciprocally affect each other's evolution through the process of natural selection. The term sometimes is used for two traits in the same species affecting each other's evolution, as well as gene-culture coevolution. Charles Darwin mentioned evolutionary interactions between flowe...

 

 

British entry for the Eurovision Song Contest 1993 Better the Devil You KnowSingle by Soniafrom the album Better the Devil You Know B-sideNot What I Call LoveReleased19 April 1993 (1993-04-19)[1]Length2:36LabelAristaSongwriter(s) Brian Teasdale Dean Collinson Producer(s)Nigel WrightSonia singles chronology Boogie Nights (1992) Better the Devil You Know (1993) Hopelessly Devoted to You (1994) Eurovision Song Contest 1993 entryCountryUnited KingdomArtist(s)Sonia EvansAsSo...

 

 

Twin towns of Linköping in 2010 Map of Sweden This is a list of municipalities of Sweden which have standing links to local communities in other countries known as town twinning (Swedish: vänort) (usually in Europe) or sister cities (usually in the rest of the world). As a sign of deteriorating relations with China, Gothenburg, Linköping, Luleå and Västerås, which have had long-standing twinning or partnership agreements with Chinese cities – Shanghai, Guangzhou, Xian and Jinan respe...

Musical setting by Arnold Schoenberg of 21 selected poems by Albert Giraud For other uses, see Pierrot lunaire (disambiguation). Pierrot lunaireMelodrama by Arnold SchoenbergSelf-portrait by Schoenberg, 1910Full titleDreimal sieben Gedichte aus Albert Girauds Pierrot lunaireOpus21StyleFree atonalityTextAlbert Giraud's Pierrot lunaireLanguageGermanComposed1912DurationAbout 35 to 40 minutesMovements21ScoringPierrot ensemble plus reciterPremiereDate16 October 1912 (1912-10-16)Loca...

 

 

Il tempio solare è una particolare struttura dell'architettura sacra egizia che si discosta dai canoni classici usati negli edifici di culto divino. Ricostruzione del tempio solare di Setibtawy (Niuserra) ad Abu Gurab Questi canoni classici prevedevano una costruzione detta a cannocchiale che attraverso atri e corridoi sempre più bui, sfociavano nel sacrario monolitico del naos, avvolto nella più fitta oscurità. Il tempio solare invece era l'opposto e da un accesso in penombra si giungeva...

 

 

この存命人物の記事には検証可能な出典が不足しています。 信頼できる情報源の提供に協力をお願いします。存命人物に関する出典の無い、もしくは不完全な情報に基づいた論争の材料、特に潜在的に中傷・誹謗・名誉毀損あるいは有害となるものはすぐに除去する必要があります。出典検索?: 綿貫民輔 – ニュース · 書籍 · スカラー · CiNii ...

American YouTuber (born 1993) Lucas CruikshankCruikshank in 2014Personal informationBornLucas Alan Cruikshank (1993-08-29) August 29, 1993 (age 31)Columbus, Nebraska, U.S.NationalityAmericanOccupations YouTuber actor PartnerMatthew Fawcus (2013–present)Websitewww.heyitsfred.comYouTube informationAlso known asFred, LucasChannel Lucas Years active2006–presentSubscribers3.37 million[1]Total views255.8 million[1] Creator Awards100,000 subscribers20081,000,000 su...

 

 

نوكيا 3100معلومات عامةالنوع هاتف محمول الصانع نوكيا أهم التواريختاريخ الإصدار 2003 الإصداراتنوكيا 3510 نوكيا 3200 تعديل - تعديل مصدري - تعديل ويكي بيانات نوكيا 3100. نوكيا 3100 هو أحد أجهزة نوكيا، شركة الهواتف والتقنية النقالة.[1][2] يأتي هذا الجهاز مع شاشة نوعها 128 * 128 12-بت (4096) ل�...