Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GzipError.Kind.buffer thrown on gunzipped() #51

Open
inigonavenio opened this issue Jun 7, 2022 · 0 comments
Open

GzipError.Kind.buffer thrown on gunzipped() #51

inigonavenio opened this issue Jun 7, 2022 · 0 comments

Comments

@inigonavenio
Copy link

I have encountered an issue while gunzipping a file 52KB size long. I mention size as I reckon that is the root cause.
public var isGzipped: Bool works correctly, and recognises the file as such, a gzipped file.
However, library fails to gunzip it and throws and error when using public func gunzipped() throws -> Data

Error thrown looks as follows:
▿ GzipError

  • kind : Gzip.GzipError.Kind.buffer
  • message : "Unknown gzip error"

Reading through zlib documentation, seems like Z_BUF_ERROR is not fatal (this is what causes GzipSwift to eventually throw Gzip.GzipError.Kind.buffer), and deflate() can be called again with more input and more output space to continue compressing.

I'm attaching the above mentioned file, in hopes that this issue gets resolved by contributors soon / at some point :)

UPONAN_gzip.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant