Add ability to set window_bits when using rust backend? #410
Replies: 2 comments 2 replies
-
You can probably wire it up and see if miniz_oxide can fully represent it. Probably there are tests for this already, but it would be good to double-check that |
Beta Was this translation helpful? Give feedback.
-
You could add it though just like the original miniz the window bits argument doesn't do anything other than make the stream use a deflate wrapper if window bits is positive or no wrapper if it's negative (which the window_bits function in flate2 doesn't let you do directly.) If you for some reason want to use new_with_window_bits instead of the normal init function and init it with the standard window size I guess you could just add it and not that there is no reason to use it and the window size argument does not have any effect with the miniz_oxide backend (though I have no idea why you would want that.) For it to be useful you would need implement support in miniz_oxide for compressing with smaller than the max window size (and decompressing with smaller buffers and/or erroring on encountering the wanted max window size) though that is an very niche use case. It was mainly useful back in the day in very memory limited situations and if you are in that sort of realm you probably would want to use miniz_oxide or zlib in no_std mode directly. If there is a need for it feel free to contribute to miniz_oxide, I'm not very active in contributing myself at the moment. |
Beta Was this translation helpful? Give feedback.
-
I was wondering if it would be possible to support
new_with_window_bits
function without needing thezlib
orzlib-ng
features.Seems like the option for setting window_bits is available in
miniz_oxide
Beta Was this translation helpful? Give feedback.
All reactions