1024jp / GzipSwift

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

Decompression failed: incorrect header check #5

Closed edwin123chen closed 7 months ago

edwin123chen commented 9 years ago

When i use the source, but i will raise error to say: Decompression failed: incorrect header check

How can i fix the problem?

I try a lot to search help from google, but no good answer and i still have such problem, can you please help?

1024jp commented 9 years ago

Hmm, it can related to #4. I'll check the code later.

1024jp commented 9 years ago

Anyway, did you confirmed the followings?:

  1. The data (file) can be decompressed with other application (e.g. Finder).
  2. The error always raises, or with a specific data.
edwin123chen commented 9 years ago

thanks for the answer. Actually, i try to compose data from network (with below url: http://hq.sinajs.cn/list=sh600208). In the closure, i am using below code: var task = session.dataTaskWithURL(url) { (data, response, error) -> Void in if error !=nil { ... }else{ println("data is: (data.gunzippedData())") } }

Then error raise in the console to say: Decompression failed: incorrect header check.

edwin123chen commented 9 years ago

Anyway, did you confirmed the followings?:

The data (file) can be decompressed with other application (e.g. Finder). =>yes, it can be open in chrome => and if i print the data directly, i can print some data even it is not my expected data format The error always raises, or with a specific data. =>yes. the error always raise...

1024jp commented 7 months ago

This issue was closed because it has been inactive for years since the last update and may be outdated.