1024jp / GzipSwift

Swift package that enables gzip/gunzip Data using zlib
MIT License
544 stars 134 forks source link

gzipping creates data which is not unzipable #40

Closed Vario closed 5 years ago

Vario commented 5 years ago

Since Swift 5 the zipped data cannot be unziped again, even not in Finder.

When extracting not via API, the result is a file with name: origname.gz.cpgz

Extracting via API results in an empty String. Compressed was a String with utf8 enconding.

bellebethcooper commented 5 years ago

I'm having this issue as well, and when trying to unzip using Terminal, I get this error:

End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
grEvenX commented 5 years ago

@bellebethcooper @Vario Are you sure you were using version 5.0.0 of the GzipSwift library when you got this error? We are experiencing the same, but didn't update to 5.0.0 yet (which we will try tomorrow).

bellebethcooper commented 5 years ago

@bellebethcooper @Vario Are you sure you were using version 5.0.0 of the GzipSwift library when you got this error? We are experiencing the same, but didn't update to 5.0.0 yet (which we will try tomorrow).

I haven't tried 5.0. I tried 4.1 and older versions. I'm using Swift 4.2, not Swift 5.

nik6018 commented 5 years ago

I am using swift 4 and currently on ver 5.0.0 of GzipSWift and getting the following error when I try to unzip the zipped data : Gzip.GzipError.Kind.data, message: "unknown compression method") This issue started when I upgraded to Xcode 10.2.1, it was working fine on Xcode 10.1

And this specifically happens for for Data encoded via JSONEncoder

grEvenX commented 5 years ago

For the record, we updated to 5.0.0 and are using it together with Swift 5 / XCode 10.2.1 and haven't seen any issues after upgrading to that 👍

bellebethcooper commented 5 years ago

@grEvenX Thanks for the update! I've just migrated to Swift 5 so I'll update to 5.0.0 and try it soon.

bellebethcooper commented 5 years ago

@grEvenX After migrating to Swift 5 and installing 5.0.0 of GzipSwift I'm not having issues anymore either 👍