Skip to content

Fix for zip compression errors

jhol requested to merge jhol/gcab:gcap-fix into master

This patch set addresses the issue raised in bug #16 (closed)

In some circumstances with highly entropic data (e.g. already compressed data), it is possible for the Deflate algorithm to expand the data. When this happens, the MSZIP compression scheme stipulates that the compressor should re-encode the block in raw uncompressed form.

This patch set contains two small tidy-ups, adds checks to the gcab decoder to detect oversize/inflated blocks as are present in Windows, and a patch to correct the issue with the encoder.

Merge request reports