zlib questions

Posts: 1
Joined: 2009.08
Post: #1
Hi there,

I'm using zlib compress function, two questions:

1) in finder, how can I decompress a file that was compressed via zlib in my app ?

2) how can I know in my app, if a file is compressed (via zlib too) ?

Quote this message in a reply
Posts: 1,483
Joined: 2002.09
Post: #2
1) gzip files are compressed using zlib. Not sure how much extra header information it adds though. It's been a while since I used zlib directly, but it has drop in replacements for fopen(), fread(), etc for working with gziped files.

2) That is the sort of thing that you need to track yourself really. I would guess that zlib streams always start with a magic number though.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Post Reply