[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Data Compression
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
> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
> Sent: Friday, March 06, 2009 2:04 PM
> To: HTTPAPI and FTPAPI Projects
> Subject: Re: Data Compression
>
> It depends on what you mean by "compressed data". If you expect
> compression to be part of the HTTP protocol, then no, HTTPAPI doesn't
> do
> compression. Compression is negotiated between the client (HTTPAPI in
> this case) and the server. HTTPAPI will negotiate a "no compression"
> connection.
>
> However, if I take what you said completely literally, then it's not a
> compressed HTTP protocol, it's compressed data. You said the
> compression is being done BEFORE it's sent via HTTP. In that case,
> it's
> not HTTPAPI's place to decompress it. The compressed data will come
> through (bytes are bytes, after all) and you'll get compressed data
> returned to you on the output end. you'll then have to run a separate
> program (gunzip, bunzip2, unzip, etc) to decompress it, and then can
> work with it as normally... in this situation , the compression has
> little to do with HTTPAPI.
>
> So, HTTPAPI will work in both cases. In the case of HTTP compression,
> HTTPAPI negotiates no compression and works fine. In the case where
> the data is compressed ahead of time, HTTPAPI will return the
> compressed
> data to your program, and you can decompress it before using it.
>
>
>
> Karl Woods wrote:
> > I was just asked a question by our Web Services guys: Can HTTPAPI
> handle
> > compressed data. Meaning that I send a request that the returned data
> be
> > compressed before sending it and then HTTPAPI decompresses the
> received
> > data.
> -----------------------------------------------------------------------
> 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
-----------------------------------------------------------------------