You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
I received the same error on my device. Turns out that the gzip'ed data was not complete. Make sure that you are flushing / closing the stream when generating the gzip data. The error message that I received was not clear.
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
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
The text was updated successfully, but these errors were encountered: