Page 1 of 2
		
			
				zlib
				
Posted: 
Nov 26, 2002 @ 6:01amby v0101
				
			 
			
		
			
				
				
Posted: 
Nov 26, 2002 @ 4:46pmby angedelamort
				
			 
			
		
			
				
				
Posted: 
Nov 27, 2002 @ 12:52amby v0101
				
			 
			
		
			
				
				
Posted: 
Nov 27, 2002 @ 8:31amby Malmer
				
			 
			
		
			
				
				
Posted: 
Nov 27, 2002 @ 9:04amby v0101
				
			 
			
		
			
				
				
Posted: 
Nov 27, 2002 @ 4:32pmby cryo
				
			 
			
		
			
				
				
Posted: 
Nov 27, 2002 @ 4:36pmby Dan East
				Yep.  
Dan East
			 
			
		
			
				
				
Posted: 
Nov 27, 2002 @ 4:38pmby cryo
				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
			 
			
		
			
				
				
Posted: 
Nov 27, 2002 @ 6:09pmby Dan East
				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
			 
			
		
			
				
				
Posted: 
Nov 27, 2002 @ 6:35pmby cryo
				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
			 
			
		
			
				
				
Posted: 
Nov 28, 2002 @ 12:06amby Malmer
				
			 
			
		
			
				
				
Posted: 
Nov 28, 2002 @ 3:14pmby v0101
				
			 
			
		
			
				
				
Posted: 
Nov 28, 2002 @ 3:47pmby cryo
				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
			 
			
		
			
				
				
Posted: 
Nov 28, 2002 @ 5:35pmby v0101
				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...
			 
			
		
			
				
				
Posted: 
Dec 7, 2002 @ 10:24amby brendan