The compression logic pads the last byte with zero bits, but the decompression logic does not know how many bits are actually valid. As a result, padding bits are also decoded, which can produce extra (garbage) characters at the end of each decompressed chunk.
This leads to corrupted output where the decompressed file does not exactly match the original input.
The compression logic pads the last byte with zero bits, but the decompression logic does not know how many bits are actually valid. As a result, padding bits are also decoded, which can produce extra (garbage) characters at the end of each decompressed chunk.
This leads to corrupted output where the decompressed file does not exactly match the original input.