Re: [saml-dev] DEFLATE Implementation in JAVA

From
Ian Young <>
Date
2006-04-12T13:22:03+00:00
ID
Thread
Re: [saml-dev] DEFLATE Implementation in JAVA
Lars Beekmann wrote:

> But the code I use to deflate seems correct to me. I would appreciate 
> any hints, what I might be doing wrong!

[...]

> ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
> 
> DeflaterOutputStream deflaterOutputStream = new 
> DeflaterOutputStream(byteArrayOutputStream);       

I'm not sure it is relevant, but that DeflaterOutputStream constructor 
uses a default Deflater with a wrapper round the stream.  It is possible 
that you need one without the wrapper, for which you'd need to create 
the Deflater yourself (there is a constructor with a "nowrap" parameter) 
and pass it in to the appropriate DeflaterOutputStream constructor as a 
second parameter.

	-- Ian