no error or return for pako inflate?
See original GitHub issueHi there,
I’m trying to use pako for clientside decompression but for some reason the code doesn’t return the decompressed Uint8Array when using the inflate
method. I also don’t see an error getting caught for some reason?
Any help would be great!
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Failing to inflate a sequence of bytes · Issue #174 · nodeca/pako
The problem is, that pako.js can not do Deflate decompression. ... the content of file.log var bytes = pako.inflate(buf); // throws an error...
Read more >Pako js returns invalid result after inflate - Stack Overflow
Chrome throws me an error: "Uncaught SyntaxError: Unexpected identifier", because pako gives invalid code. So, perhaps, problem with charset ...
Read more >pako 2.1.0 API documentation
Sends input data to inflate pipe, generating Inflate#onData calls with new output chunks. Returns true on success. If end of stream detected, ...
Read more >How to use the pako.inflateRaw function in pako - Snyk
Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately. ... inflateRaw(data)); } catch (e)...
Read more >fflate - npm
fflate (short for fast flate) is the fastest, smallest, and most versatile pure JavaScript compression and decompression library in existence, ...
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
Reproduction sample:
really? one extra byte made all the difference I suppose.
The length of the compressed data was something that I calculated using the first 4 bytes of the chunk header pasted again here
but it’s entirely on me that there’s an off by one error in calculating the length of the compressed data.
So in a sense the extra byte in the binary file comes from me supplying one too many bytes probably by computing the length in bytes of the compressed data wrong with this code
supplying the
[0,0,15,131]
as the hdr parameter aboveI guess I shouldn’t expect pako to speak up in cases like this with an error thrown though.