-
Notifications
You must be signed in to change notification settings - Fork 36
Inflate with window bits 47 doesn't correctly inflate #34
Comments
Thanks for reporting. This should be fixed in v1.2.12_jtk.2 Once the paperwork goes through, I'll open a PR on dotnet/runtime |
I been wondering what is the difference between this version of zlib and madler's version (other than for speed). I been manually p/invoking madler's zlib in all Windows, linux, and macos due to a few reasons:
|
@AraHaan If you look at the git history, you'll notice that each release is organized as a madler zlib snapshot and then a series of patches on top of that. When there's a new madler release, the patches get rebased on top of that. So it's very easy to see the changes that we've made. Git can also provide a nice diff for you.
|
Doing nuget releases of prebuilt binaries actually helps out with the consumption of the library in .NET. Feel free to look at how I packaged the zlib libraries in the pull request I opened on madler/zlib to add vs2022 project files into it to get more details on how I managed to add nuget support on it (basically I have VS2022 build the library in x86, x64, ARM, and ARM64 and then run the packing code to pack them into a single windows specific nuget package, and similar for systems like mac and linux as well (as long as you know how to cross compile zlib for those architectures that is it becomes a non-issue). |
https://github.com/dotnet/runtime is using this implementation of zlib.
When trying to switch its ZLibStream's decompression to specify window bits == 47 instead of window bits == 15:
stephentoub/runtime@a11d948
lots of tests start to fail when trying to roundtrip zlib data. These failures only occur on Windows where this implementation of zlib is being used; on Linux where the distro's zlib is being used, all tests pass successfully.
The failure appears to stem from the checksum computation at the end of the input, failing at
https://github.com/jtkukunas/zlib/blob/bf29715726fe22390b59b2cbf9c935179ef49aed/inflate.c#L1273-L1274
The text was updated successfully, but these errors were encountered: