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
1 answer

Does Snappy/Zlib compressions in mongo only reduced the bandwidth or the document size saved in DB

Recently for one of the projects, we require compressions for MongoDB documents, Found out there are multiple compressions algo like snappy, zlib and etc. Most of the articles on these only talked about network compressions and reduced bandwidth…
0
votes
1 answer

incorrect header check while trying to uncompressed s3 object body?

I compress and upload an object to s3 using the follwoing code: let data: string | Buffer = JSON.stringify(rules); let contentType = "application/json"; let encoding = null; let filename = `redirector-rules.json`; if (format === "gz") { …
awm
  • 1,130
  • 3
  • 17
  • 37
0
votes
2 answers

What is NUL character in unzipped git object files?

I try to unzip .git/objects' commit/blob files. I do it using zlib and nodeJS. The result after unzipping e.g. index.html blob is ▼ ▼ Question: what this NUL character means? Am I doing something wrong while unzipping?
Dan
  • 177
  • 1
  • 11
0
votes
0 answers

how to resolve a type error when using zlib.gunzip with s3 client?

I am using the following code the uncompress a file from s3. // Get the file from S3 const resp = await client.send(rulesCommand); let result = resp.Body; if (rulesCommand.input.Key?.endsWith('.gz')) { result = await…
awm
  • 1,130
  • 3
  • 17
  • 37
0
votes
2 answers

Python 2.5 zlib trouble

I am trying to deploy an app on google app engine using bottle, a micro-framework, similar to flask. I am running on ubuntu which comes with python 2.7 installed but GAE needs version 2.5, so I installed 2.5. I then realized I didn't use make…
Jesramz
  • 97
  • 1
  • 7
0
votes
0 answers

how to correctly set an Express handler to download a gziped file?

I have this express handler that download a csv file: export const download: Handler = async (req: any, res) => { const limit = 1000000; const skip = 0; const [redirects] = await Promise.all([ query.redirect.get({}, { limit, skip }) …
awm
  • 1,130
  • 3
  • 17
  • 37
0
votes
2 answers

nodejs and vb.net - zlib deflate compression non-compatibility between nodejs and vb

I'm trying to communicate between a client and a server, with the client being on VB.NET and the server on nodejs. It works, but I'm now trying to use the deflate compression method which seems to not work exactly the same in vb.net and…
Lethalic
  • 1
  • 1
0
votes
0 answers

How to decode a PDF file encoded with some format (probably FlateDecode) in Node.js and extract the plain text content from it?

I'm building a whatsapp chatbot wherein I have to scrape the content of a pdf sent by the user to the bot. Whatsapp automatically downloads the file and uploads it to its the cloud and we get the url to access the pdf (but only with a…
0
votes
0 answers

How to customize python libz.so.1 reference in linux system

I'm currently using linux system. I have a simple python GUI code that uses matplotlib library. My IDE is spyder(Anaconda) and this python code work well. The problem is when I run this code on linux console ( $ python my_matplotlib_gui.py) (Of…
Brian Kim
  • 33
  • 4
0
votes
1 answer

Reconstruction function for scanlines in IDAT chunk

I'm trying to write png reader using python and zlib. I do not understand what to do after I've decompressed IDAT content. My code now (imagine that we have only one IDAT chunk): ... def IDAT(self, chunk_size): data =…
Kre4
  • 95
  • 5
0
votes
0 answers

Cross Compile zlib and openssl from docker linux container to armv7 error libz.so: file not recognized: file format not recognized

I have been trying for weeks to cross compile zlib, openssl, and openssh. Last attempt resulted in an error in cross compiling openssl: /usr/local/zlib/lib/libz.so: file not recognized: file format not recognized Here is the last attempt I made: #…
bkepley
  • 71
  • 1
  • 3
0
votes
1 answer

Python Zlib: Why the base64 encoded content not consistent when compressed and decompressed

My questions are as follows: I have a number of these strings, which are compressed by the Java Inflater tool and encoded in base64. To do this I wrote the following python code to solve for the plaintext in reverse. When I try a short…
moqin
  • 64
  • 8
0
votes
1 answer

Zlib uncompressed for partial

Please help me understand what I'm doing wrong? Suppose I have a compressed data buffer using Zlib of course. Now I want to decompress this data, but not in one piece, when I allocate a guaranteed size for the output buffer so that all the…
Serg_
  • 67
  • 5
0
votes
0 answers

How to resolve a Zlib issue — Java migration from 8 to 11

I am working on upgrading Java version from 8 to 11 for an application (maven/spring-framework- no spring boot). The code compiles fine, war is deployed, and application is up and running. But, it is unable to process incoming client requests. It's…
Ganesh MN
  • 11
  • 4
0
votes
0 answers

incorrect header check , zlibOnError on Axios

I am trying to convert my project from reactjs to nextjs, While converting the backend was stable as it is on earlier, I have to change the frontend functions only. But I am getting an invalid header error while accessing the API. If am removing the…
Ajith Arasu
  • 79
  • 10