-
-
Notifications
You must be signed in to change notification settings - Fork 125
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
gunzippedData returns nil for large NSData #4
Comments
I'm not sure how helpful this will be but have you tried checking the result of the call to "deflateInit2_" function in the "gzippedData" function? Perhaps it is returning something other than "Z_OK" and thus returning "nil." For example, maybe you're actually getting an "Insufficient memory available" error: http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/zlib-deflateinit2.html. Just from looking at the source code, it's either that or you're not actually loading any data and so "self.length" is 0 in the "gzippedData" function. |
Yes. It is not returning the status as "Z_OK", instead "Z_DATA_ERROR" only for larger NSData. |
Hi, I've just improved the extension:
I hope it is some kind helpful to identify your problem. Just printing error message is of course not a good solution. However I have a plan to integrate the |
Hi, Additional notes:
Let me know if you have any suggestions on this. Thanks. |
This issue was closed because it has been inactive for years since the last update. |
I tried using this code to uncompress(gunzip) gzipped NSData in swift. Gunzip works fine when the gzipped NSData is smaller in size (eg. 653 bytes), however fails (returns nil) for larger NSData (eg. 9491 bytes).
Could you please let me know the fix for this?
The text was updated successfully, but these errors were encountered: