Questions tagged [zlib]

zlib is a library used for data compression. Also a crucial component of many software platforms including Linux, Mac OS X, and the iOS

zlib is a library (current version: 1.2.8, released April 28, 2013) that is very widely used for doing data compression. It is open source software written in C, and is unencumbered by patents. It supports three principal compression formats:

  • format Raw compressed data
  • format data (essentially just raw data with a small header)
  • format data (the raw data with a considerably more sophisticated header)

Documentation may be found in RFC-1950 (zlib), RFC-1951 (deflate), and RFC-1952 (gzip).

The zlib library was created by Jean-loup Gailly and Mark Adler.

2362 questions
15
votes
2 answers

Python using ZIP64 extensions when compressing large files

I have a script that compresses the output files. The problem is that one of the files is over 4Gigs. How would I convert my script to use ZIP64 extensions instead of the standard zip? Here is how I am currently zipping: try: import zlib …
txwylde
  • 151
  • 1
  • 1
  • 4
15
votes
3 answers

When do I need zlib in OpenSSL?

Some site describe config & make for OpenSSL with zlib while I can do it without zlib. It means zlib is not necessary for openSSL in some case. Does anyone tell me what case OpenSSL does compression or decompression? The answer from @Giacomo1968 is…
user1345414
  • 3,745
  • 9
  • 36
  • 56
15
votes
4 answers

Homebrew updated zlib and broke everything

So a brew update updated zlib from 1.2.7 to 1.2.8. Yay. Later I noticed there was an issue running bundle. I was getting a LoadError for zlib. Error loading RubyGems plugin…
Michael Gruber
  • 601
  • 2
  • 11
  • 24
15
votes
6 answers

How to use request or http module to read gzip page into a string

I found the request module in js cannot handle gzip or inflate format http response correctly. for example: request({url:'some url'}, function (error, response, body) { //if the content-encoding is gzip, the body param here contains binaries…
user966085
  • 303
  • 1
  • 4
  • 10
14
votes
5 answers

zlib build error with GHC

I'm using a VM with the following configuration: Arch Linux (3.0-ARCH kernel) GHC 7.0.3 cabal-install 0.10.2 Cabal library 1.10.1.0 When I try to build zlib using cabal... $ cabal install zlib I get the following output: Resolving…
Jon Nadal
  • 729
  • 9
  • 14
14
votes
8 answers

Could not locate zlibwapi.dll. Please make sure it is in your library path

I am working on a object detection project and wanting to process the project with my GPU. I have completed the NVIDIA setup tutorial and everything works fine. My object detection code originally works with the CPU, however when I add these two…
Ron
  • 173
  • 1
  • 1
  • 9
14
votes
8 answers

Zlib-compatible compression streams?

Are System.IO.Compression.GZipStream or System.IO.Compression.Deflate compatible with zlib compression?
Ben Collins
  • 20,538
  • 18
  • 127
  • 187
14
votes
3 answers

How can I easily compress and decompress files using zlib?

How can I easily compress and decompress files using zlib?
Datoxalas
  • 1,261
  • 5
  • 14
  • 23
14
votes
2 answers

How to link Zlib with Cmake

I am trying to link my file with the zlib libray but still get: undefined reference to `deflateInit_'. I am currently using CLion, have downloaded the zLib file from the homepage and added it into the project. This is how my CmakeLists.txt looks…
AKJ
  • 950
  • 2
  • 13
  • 18
14
votes
3 answers

How does one achieve parallel gzip compression with Python?

Big file compression with python gives a very nice example on how to use e.g. bz2 to compress a very large set of files (or a big file) purely in Python. pigz says you can do better by exploiting parallel compression. To my knowledge (and Google…
Virgil Gheorghiu
  • 493
  • 1
  • 4
  • 13
14
votes
4 answers

how to add zlib to an existing qt installation

How can I add zlib to an existing installation of Qt. I m pretty new in this so please give me detailed description! Thanks for your help in advance!
defiant
  • 3,161
  • 11
  • 41
  • 65
14
votes
1 answer

Git fatal: pack has bad object at offset X: inflate returned -5

Git has given me a lovely christmas gift... I'm trying to git push a bunch of commits, like 6 GB. And I'm getting the following error message: -Counting objects: 525, done. Delta compression using up to 24 threads. Compressing objects: 100%…
Andrew Latham
  • 5,982
  • 14
  • 47
  • 87
14
votes
1 answer

how to link zlib library

Hi I'm using boost and zlib filter to compress and decompress data. on the instruction of boost page, it is saying if the .cpp file depends on an external library, you'll have to build it from the source or link to a pre-built binary. I used mac…
weeo
  • 2,619
  • 5
  • 20
  • 29
13
votes
2 answers

zlib, deflate: How much memory to allocate?

I am using zlib to compress a stream of text data. The text data comes in chunks, and for each chunk, deflate() is called, with flush set to Z_NO_FLUSH. Once all chunks have been retrieved, deflate() is called with flush set to Z_FINISH. Naturally,…
feklee
  • 7,555
  • 9
  • 54
  • 72
13
votes
2 answers

Zlib compression Using Deflate and Inflate classes in Java

I want trying to use the Deflate and Inflate classes in java.util.zip for zlib compression. I am able to compress the code using Deflate, but while decompressing, I am having this error - Exception in thread "main"…
Ashish Agarwal
  • 14,555
  • 31
  • 86
  • 125