tsolomko / SWCompression

A Swift framework for working with compression, archives and containers.
MIT License
238 stars 41 forks source link

GzipArchive.unarchive wrongMagic for short data #34

Closed shawnclovie closed 2 years ago

shawnclovie commented 2 years ago

I was use GzipArchive.archive to compress short text like "123". Then I use GzipArchive.unarchive decompress the data, would throw error "wrongMagic" since input too short - bitReader.bitsLeft >= 33 * 8 in GzipArchive.swift line 81.

tsolomko commented 2 years ago

Fixed in 4.8.1.

Thank you for reporting this issue.