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

RE: Data Compression



I started this thread back in March. I was just reminded by our Web Services group that they intend to compress data before sending it out.

Since HTTPAPI does not decompress data, could someone tell me what steps I need to take to decompress the data before HTTPAPI parses it?

Karl B. Woods  
Sr. Programmer/Analyst
Professional Services
1960 S. Milestone Dr., Ste B
Salt Lake City, UT 84104 
Tel: (801) 433-9426 (office)
Fax: (801) 487-2775
E-mail:  karl.woods@xxxxxxxxxxxxxx


-----Original Message-----
From: Scott Klement [mailto:sk@xxxxxxxxxxxxxxxx] 
Sent: Friday, March 06, 2009 6:06 PM
To: HTTPAPI and FTPAPI Projects
Subject: Re: Data Compression

hi Mike,

It would be RecvDoc() and/or RecvChunk() that would have to be modified, 
and not RecvResp().  Compression does not affect the HTTP keywords and 
other header information, it only affects the document itself.

and, I'm not familiar with ZLIB, so I'll take your word if you say it's 
compatible with gzip...  I know ZLIB is used in ZIP/UNZIP so I would've 
guessed it to be more like "deflate" encoding.  Maybe it does both?



Mike Krebs wrote:
> Scott,
> 
> Would adding decompression support to HTTPAPI be something like this?
> 
> 1. Pick a decompression library/program (ie zlib which seems to be ported to
> the standard library system and can be used to compress/uncompress gzip
> encoded objects)
> 2. Build a DECODE module similar to the encoder routines.
> 3. Build in the content-header Accept-Encoding: gzip
> 4. Extend the doget (or maybe RecvResp?) procedure to uncompress compressed
> data. This would also touch parse_resp_chain to find out if the content was
> gzipped similar to the way you handle 'chunked'? 
> 
> Mike Krebs
> 
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------