English 中文(简体)
In gzip library, what s the difference between uncompress and gzopen ?
原标题:
  • 时间:2010-02-01 03:13:38
  •  标签:
  • zlib

There are some functions to decompress in zlib library (zlib version 1.2.3)

I want to decompress my source zip (.gz) file using uncompress function. It is not working (error code -3) but gzopen is. It is still not working when I input payload pointer (passing gzip header) to uncompress.

So the question is:

  • What s the valid arguments for uncompress function?
  • If it needs different format, how can I make it?
问题回答

You have to use some poorly documented features of the zlib library. See my answer to this question for more information: How can I decompress a gzip stream with zlib?





相关问题
How to determine compressed size from zlib for gzipped data?

I m using zlib to perform gzip compression. zlib writes the data directly to an open TCP socket after compressing it. /* socket_fd is a file descriptor for an open TCP socket */ gzFile gzf = gzdopen(...

Transparent SQLite Data Compression

I am looking for an existing solution for transparent SQLite 3 zlib compression using a custom VFS implementation and a custom IO methods implementation. Is anyone aware of an existing project that ...

"Untar" file on iPhone

I m writing an iPhone app which downloads a tar-gzipped file from a Webserver, then needs to unarchive this file so that it can be copied into the app s Documents folder. I m using tar/gzip because I ...

Compress data before storage on Google App Engine

I im trying to store 30 second user mp3 recordings as Blobs in my app engine data store. However, in order to enable this feature (App Engine has a 1MB limit per upload) and to keep the costs down I ...

Unzipping part of a .gz file using python

So here s the problem. I have sample.gz file which is roughly 60KB in size. I want to decompress the first 2000 bytes of this file. I am running into CRC check failed error, I guess because the gzip ...

热门标签