sunzip
sunzip copied to clipboard
Add #defines for zip constants. Fix bug in GOOD macro, and missing check for stored method
#defines are introduced for zip constants to improve readability.
bugfix1: In the course of unzipping a record with a data descriptor and trying the various possibilities, additional bytes can be read into the input buffer by the load() macro causing in->count to jump by CHUNK bytes. To avoid this, the value of in->count is stored in a separate local variable for checking in the revised GOOD() macro.
bugfix2: Deferred lengths (data descriptors) are also seen for "stored" method with no compression, so ensure that is supported too by correcting a missing if check.