Vitaly Puzrin

Results 331 comments of Vitaly Puzrin

> I am not sure which code specifically is the wrapper https://github.com/nodeca/pako/tree/master/lib - those 2 files are top level wrappers for zlib port. If you wish to use partial compress-decompress...

I have no objection about improving flush in inflate wrapper, but i don't know how to do it right. Previous attempt to add "everything possible" (in v1) ended with cryptic...

This question is a bit out of project scope, but i recommend split all to smaller steps: 1. Drop all string conversions and make sure that `pako.inflate(data)` works correctly in...

Got it (with simple example from last post). I think, problem is here https://github.com/nodeca/pako/blob/893381abcafa10fa2081ce60dae7d4d8e873a658/lib/inflate.js#L273 Let me explain. Pako consists of 2 parts: 1. zlib port - very stable and well...

That's a minimal sample to reproduce: ```js const pako = require('pako'); let input = require('fs').readFileSync('./pako-block-decompress-failure.txt.gz'); let output = pako.inflate(input); console.log(`size = ${output.length}`); // => size = 65280 !!! ```

After quick look - seems your data really generates Z_STREAM_END status before end. Sure, wrapper can be fixed for this case, but i don't know how.

Googling "zlib inflate multiple streams": - https://gist.github.com/benwills/356d8d1e2a2ef2a9203197b846338ec3 - https://groups.google.com/forum/#!topic/comp.compression/UuGWViGLPOY - https://github.com/nodejs/node/issues/4306

Yeah, i've seen it. Could not make quick hack to work. Seems it's better to wait for weekend, when Kirill can take a look.

@Kirill89 what about [this code](https://github.com/nodeca/pako/blob/3e6fcc70f2f4fe48e452d9ae6e784d39fb9e98ef/lib/inflate.js#L279-L281) It should not force end in the middle (when multiple `.push()` callsed and some emit `Z_STREAM_END` before data ended).

https://github.com/nodeca/pako/commit/c60b97e22239c02c0b5a112abbd6c6a9b5d86b45 that needs additionas conditions update after cycle but one more test fails after that.