etcimon / botan

Block & stream ciphers, public key crypto, hashing, KDF, MAC, PKCS, TLS, ASN.1, BER/DER, etc.
Other
86 stars 22 forks source link

Error decompressing zlib data in a Pipe #38

Open lesderid opened 7 years ago

lesderid commented 7 years ago

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.

etcimon commented 7 years ago

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.

lesderid commented 7 years ago

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