GzipSwift icon indicating copy to clipboard operation
GzipSwift copied to clipboard

Decompression failed: incorrect header check

Open edwin123chen opened this issue 10 years ago • 4 comments

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?

edwin123chen avatar Aug 05 '15 07:08 edwin123chen

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

1024jp avatar Aug 05 '15 07:08 1024jp

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.

1024jp avatar Aug 05 '15 07:08 1024jp

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 avatar Aug 05 '15 08:08 edwin123chen

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...

edwin123chen avatar Aug 05 '15 08:08 edwin123chen