Hello! This is my first post here
I have thousands of files obtained from a Nintendo Switch save file that I believe are compressed with zlib (has 0x789C in the header) that I wish to decompress. However, all attempts I've made to decompress any of these files have failed with Z_DATA_ERROR. Interestingly... the decompression works normally near the beginning, but will eventually fail, or continue through the entire file but with mistakes and random chunks of repeated characters in the output. I know what the output should look like, and the partially decompressed data is valid.
I've created a stackoverflow post better describing the issue. I hope linking to it isn't against any rules. https://stackoverflow.com/questions/...hrough-inflate
This issue is not limited to 1 file. I have tested this on thousands of files and they all have the same problem. I've been at this for days trying to understand what's going on, and all I can think of is that some custom zlib compression was used instead of the default compression. Reaching out to the experts here
I've attached an example file that fails to decompress at around 0x196
Thanks for your time!