This site is no longer active and is available for archival purposes only. Registration and login is disabled.

zlib


zlib

Postby v0101 » Nov 26, 2002 @ 6:01am

v0101
pm Insider
 
Posts: 147
Joined: Feb 1, 2002 @ 12:04am


Postby angedelamort » Nov 26, 2002 @ 4:46pm

User avatar
angedelamort
pm Member
 
Posts: 304
Joined: Mar 7, 2002 @ 11:16pm
Location: Montreal, Quebec


Postby v0101 » Nov 27, 2002 @ 12:52am

v0101
pm Insider
 
Posts: 147
Joined: Feb 1, 2002 @ 12:04am


Postby Malmer » Nov 27, 2002 @ 8:31am

All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Postby v0101 » Nov 27, 2002 @ 9:04am

v0101
pm Insider
 
Posts: 147
Joined: Feb 1, 2002 @ 12:04am


Postby cryo » Nov 27, 2002 @ 4:32pm

User avatar
cryo
pm Member
 
Posts: 204
Joined: Sep 19, 2001 @ 6:01am
Location: Bonn, Germany


Postby Dan East » Nov 27, 2002 @ 4:36pm

Yep.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby cryo » Nov 27, 2002 @ 4:38pm

Thanks Dan,

i have tried that, but it's not working, i always get a Z_DATA_ERROR.

do you have a code sample?

cryo
User avatar
cryo
pm Member
 
Posts: 204
Joined: Sep 19, 2001 @ 6:01am
Location: Bonn, Germany


Postby Dan East » Nov 27, 2002 @ 6:09pm

Sample to do what, compress or decompress? I just open the file with gzopen and then gzwrite or gzread (and of course stick a .gz on the end if I'm creating).

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby cryo » Nov 27, 2002 @ 6:35pm

i was trying to store compressed (i.e. gzipped) files as resources, get a pointer to them at run time and decompress using zlib, but i get different errors.

I'm using the inflateInit2, inflate and inflateEnd functions as described in the examples. Also, i am giving inflateInit2 a -15 as second parameter to skip the .gz headers and go straight to the deflated data.

The problem is, none of this works. Has anyone done something like this before?

thanks

cryo
User avatar
cryo
pm Member
 
Posts: 204
Joined: Sep 19, 2001 @ 6:01am
Location: Bonn, Germany


Postby Malmer » Nov 28, 2002 @ 12:06am

All your base are belong to us
User avatar
Malmer
pm Member
 
Posts: 768
Joined: Apr 26, 2001 @ 5:15pm
Location: Sweden


Postby v0101 » Nov 28, 2002 @ 3:14pm

v0101
pm Insider
 
Posts: 147
Joined: Feb 1, 2002 @ 12:04am


Postby cryo » Nov 28, 2002 @ 3:47pm

i know it works that way, it's just that the fact that it seems to be impossible to do proper in-memory decompression of a gzipped file with zlib, even if it says it can do so, triggered the sportsman in me.

Anyway, i don't have time to play around with that, so i'll go with writing my own compress prog. as you suggested.

Thanks!

cryo
User avatar
cryo
pm Member
 
Posts: 204
Joined: Sep 19, 2001 @ 6:01am
Location: Bonn, Germany


Postby v0101 » Nov 28, 2002 @ 5:35pm

Yea that really drove me crazy too! I read many other posts about people trying to decompress gzipped files in memory with zlib on Google Groups and no one seemed to have a solution which is why I originally posted. It seems that zlib can't do this...
v0101
pm Insider
 
Posts: 147
Joined: Feb 1, 2002 @ 12:04am


Postby brendan » Dec 7, 2002 @ 10:24am

User avatar
brendan
pm Insider
 
Posts: 451
Joined: Oct 23, 2001 @ 2:51am
Location: Hobart, Australia


Next

Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum