Today I investigated similar topic.
I figured out that zlib writes the adler32 checksum to the file, but the implementation never checks them. So any flipped bit causes such issues.
I did not found an easy way to implement the error check as you need to do that in zLib.pas.
Here is explaind where to find the checksum in the file (ist simply msbfirst, so you can easyly read thet strait forward). only in german.
https://www.gocher.me/GZIP
The current adler32 checksum can be get while debugging.