ZInputStream ignores nowrap
saurik opened this issue · comments
While there is a constructor on ZInputStream that takes a nowrap argument, it is not used to actually configure the underlying InflaterInputStream to support headerless compressed data.
Additionally, there is an init(nowrap) on Inflater (one that doesn't require you to manually pass the window size), but as there is no constructor on Inflater that takes only nowrap, you have to initialize it twice (or manually pass DEF_WBITS; I'm not certain which I consider more correct, but I'm currently going with the latter).
(Oh, but DEF_WBITS is private, so no: I guess the options are now either to hard-code that value--not entirely unreasonable, and often done in other environments like Python's zlib--or to double-initialize; I guess I'm now going to do the latter. ;P)
Thank you for your feedback.
It has been fixed in
197205d
Please try it.