Calling `inflate` on data created from `Pako.deflate` returns `(null, null)`
See original GitHub issueIssue Description
Some observations that I noted:
inflate
fails with (null, null)
inflateSync
fails with EOF:
This is probably the most important problem since one would expect either data or an error.
decompress
works fine:
deflateSync
: incorrect header check
It appears as though Pako has a different idea of what constitutes inflate
/ deflate
i.e.
gzipSync
: seems to correspond to pako.inflate
I noted that the builtin CompressionStream
seems to correlate with what Pako does i.e. 'inflate'
algorithm for Pako and CompressionStream seem to be the same.
zlib
: same as gzip
zip
: fails, same as deflate
Summary
I’ve no idea what’s going on here (and the issues observed may be with Pako), but I hope the above is useful feedback.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Restore deflate { to: 'string' } option on version 2 #206
Hello, I'm currently using the following code with Pako 1.0.11: pako.deflate(textEncode(source), { level: 9, to: 'string' }) I noticed that the option {...
Read more >How do you open zlib compressed data from Node.js in ...
I am using the Pako NPM package like so: pako.deflate(JSON.stringify(json), { to: 'string' }) to compress a JSON payload and am able to...
Read more >pako 2.1.0 API documentation
Sends input data to deflate pipe, generating Deflate#onData calls with new compressed chunks. Returns true on success. The last data block must ...
Read more >How to use the pako.Deflate function in pako
To help you get started, we've selected a few pako.Deflate examples, based on popular ways it is used in public projects.
Read more >Worker.js - Source code
// inflate pass. But if output data not exists, inflate return Z_BUF_ERROR. // Here we set flag to process this error properly. // ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
v0.7.0 is released and this bug should be fixed, along with the improved errors from #54.
I found and fixed the bug; will be out in v0.7.0.