bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gzip for compression


From: kishore sowdi
Subject: Re: gzip for compression
Date: Tue, 21 Jul 2009 15:39:43 +0530 (IST)

Hi bob,

yes, zlib is a good idea.

But i have one question regarding zlib, below is the prototype of uncompress( ):

int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong 
sourceLen); 
 
where source and sourceLen are the compressed message to be uncompressed and 
its length.
and dest and destLen are the un-compressed message after decompression and its 
length.
destLen gets updated with the actual decompressed size if call to uncompress() 
is successful.
 
How much buffer size should be allocated and passed to uncompress() that is 
good enough to hold the uncompressed data?
 
Since compressor has to convey this info to decompressor and i dont see any 
such mechanism in zlib, i am finding difficult to pass "dest" and "destLen" to 
uncompress().
 
Regards,
Kishore

________________________________
From: Bob Proulx <address@hidden>
To: kishore sowdi <address@hidden>
Cc: address@hidden
Sent: Monday, 20 July, 2009 9:46:18 PM
Subject: Re: gzip for compression

kishore sowdi wrote:
> I want to use gzip for my project development, wherein i am planning
> to use gzip for compression and decompression of HTML message
> exchanges.

Are you aware that HTTP may already optionally compress messages?

> I am using windows xp and planning to go ahead with the following steps:
> - Build the gzip source code on windows.
> - Plug / Link the gzip libraries to my project source code.
> - Use the API's exported by gzip for compressing and decompressing the HTTP 
> body.

Use the zlib compression library instead.

  http://www..zlib.net/

> So, Please point at the source code location and is my approach regarding 
> usage of gzip correct?

  http://www.gzip.org/

Bob



      Love Cricket? Check out live scores, photos, video highlights and more. 
Click here http://cricket.yahoo.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]