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
0
votes
0 answers

Zlib::GzipReader doesnt read whole file

I have this block of ruby code. I need to read big json.gz file, that cannot be loaded into RAM at once (so no GzipReader.new method). To achieve this, I use GzipReader and then lazy read with batch loading. Everything works perfectly, but for some…
0
votes
1 answer

How does zlib decompression work on a PNG IDAT chunk?

I am trying to understand how PNG files work. I am stuck on how you decompress the IDAT data. I have searched the whole Internet, but I haven't found anything that I understand. I have this HEX Code of an example PNG. I have extracted the data of…
walpe
  • 3
  • 2
0
votes
1 answer

How to correctly encode a string for unzipping with zlib in Python

I am writing a Python function that receives a string and decompresses the string using zlib. I am trying to translate from the following Go code to Python, that I know works (please excuse the one letter variable names, this code was written by…
Shane Bishop
  • 3,905
  • 4
  • 17
  • 47
0
votes
1 answer

Java GZIP/ZLib inflate only one block at a time and return a checkpoint that can be used to start the next inflation

As the title says. I'm looking for a way to decompress a gzip file in such a way that I can stop decompressing on one host, upload the current location in the file and the required 32Kb of previous decompressed data required to start inflating a new…
A. Eglin
  • 11
  • 4
0
votes
1 answer

How to skip detection of random data when attempting to compress?

Do popular compressors such as gzip, 7z, or others using deflate, detect random data strings and skip attempting to compress said strings for sake of speed? If so, can I switch off this setting? Otherwise, how can I implement deflate to attempt to…
0
votes
1 answer

zlib Compress doesn't work when coding exactly as the Delphi help says

My code that is a copy from https://docwiki.embarcadero.com/CodeExamples/Alexandria/en/ZLibCompressDecompress_(Delphi) doesn't work as expected. A file is created and it look's like it is compressed. But there is no tool outside Delphi that can…
Mikael
  • 1
0
votes
1 answer

anyway to edit dd-wrt nvram .bin backup ( settings backup) file?

is there any way to edit the .bin backup ? i found program by nirosoft called "routerpassview" and it decrypted it very well but don't know how to encrypt it again to .bin file and restore settings DECIMAL HEXADECIMAL DESCRIPTION 84 …
0
votes
3 answers

Combine multiple .wasm files into one single .wasm file

Can we combine multiple (more than 10) .wasm files into a single .wasm file?
0
votes
1 answer

Buffer.isBuffer() is not a function in zlib

I was using the zlib library for gzipping my streams in React js using zlib.gzip() method. This was working perfectly fine a couple of months back. But recently I am getting an error saying Buffer.isBuffer() is not a function when I am trying to use…
0
votes
1 answer

Inflating partial gzip content with pako?

In node, zlib can be used to decompress partial gzip content (truncated). I tried the same with pako, but looks like it's not working. This is what I tried: const s =…
Moshe Shaham
  • 15,448
  • 22
  • 74
  • 114
0
votes
1 answer

malloc.cpp not found, header IS included

I am aware of this question and its solution. Its solution (to include two header files listed below) is already in the code, so the post was unhelpful relative to my program. I am working on an MFC program, using an old version of ZLib,…
0
votes
1 answer

python equivalent of C++ z_stream inflate

I am trying to decompress a .gz file that comes from a material board with custom headers using python. I have as example a C++ file that decompress that file using the inflateInit2 function from the zlib the following way…
Kevin Heirich
  • 109
  • 2
  • 12
0
votes
2 answers

Zlib is unable to extract a compress String in java, compression is done in python

Im trying to decompress a string in java, the string is compress in python with base64 encoding. I tried a day to resolve the issue, The file can decode easily online and also in python. Find similar post that people have trouble compressing and…
Aqeel Haider
  • 603
  • 7
  • 24
0
votes
1 answer

Node/JavaScript while parsing AWS CloudWatch logs - Incorrect Header Check - Z_DATA_ERROR

I'm trying to set up a Lambda function in AWS to send some logs from CloudWatch down to a Slack channel. I've found a number of tutorials on doing this, but am getting an error when invoking the JavaScript code. Here's the code: const https =…
risingTide
  • 1,754
  • 7
  • 31
  • 60
0
votes
1 answer

ZLib: DeflatePrime number of bits of Z_PARTIAL_FLUSH

In the ZLIB Manual it is stated that Z_PARTIAL_FLUSH always flush an extra 10 bits. So that we correct for that using deflatePrime when we want to append later. But why then is gzlog.c containing logic to find dynamically the bit count if *buf .…
robert
  • 1,921
  • 2
  • 17
  • 27
1 2 3
99
100