botan icon indicating copy to clipboard operation
botan copied to clipboard

Error decompressing zlib data in a Pipe

Open lesderid opened this issue 8 years ago • 2 comments

Using new TransformationFilter(new ZlibDecompression) in a Pipe and using processMsg to write the zlib-compressed data to the pipe fails with "zlib deflate error: -5". I'm guessing this is due to TransformationFilter splitting it up?

As a workaround I'm pre-processing with std.zlib.uncompress(), but I was wondering if this can be done with TransformationFilter somehow.

Additionally, I was wondering why there are no Zlib filters? The wiki and API reference seem to have them.

lesderid avatar Aug 10 '17 00:08 lesderid

Have you tried using a ZlibDecompressionStream? You can start it with specific level of compression. This part of the code was updated more recently than the wiki so it might need some updating.

etcimon avatar Aug 10 '17 01:08 etcimon

Is it possible to use a ZlibDecompressionStream with a Pipe? I'm not sure how to use it.

lesderid avatar Aug 10 '17 10:08 lesderid