Hi Darryl,

--- On Wed, 5/26/10, Darryl Miles <darryl-mailingli...@netbauds.net> wrote:

> From: Darryl Miles <darryl-mailingli...@netbauds.net>
> Subject: Re: BIO_f_zlib() / gzip Format
> To: openssl-users@openssl.org
> Cc: "Doug Kehn" <rdk...@yahoo.com>
> Date: Wednesday, May 26, 2010, 6:03 AM
> 
> 
> I have to now ask, how are you using the
> raw/original/verbatim GZIP single file compression algorithm
> with SSL ?  Who has somehow bolted that in without
> using zlib ?  You might consider zlib to be the defacto
> standard for how to apply the gzip algorithm to a stream.
> 

I have data that has been gzip and then base64.  I also have libssl, libcrypto, 
and libz available.  I was merely atttempting to take advantage of the openssl 
BIO functions to setup an in-memory chain to extract the original data.  The 
BIO functions looked to be an elegant method for performing this task.

The BIO functions decode the base64 but don't inflate the resulting binary 
data.  I assume this is because of the extra gzip header (not the underlying 
compression algorithm actually used).

The zlib site says that gzip compressed data can be uncompressed in-memory by 
using inflateInit2 instead of inflateInit.  BIO_f_zlib() calls inflateInit.

I'm able to extract the original data, in-memory, using another base64 decode 
routine and calling the appropriate zlib routines.  This is not as elegant as 
using the BIO routines, but gets the job done.

Regards,
...doug




______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to