-
-
Notifications
You must be signed in to change notification settings - Fork 790
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
Failing build since upgrading to v2.0.3 (Z_SYNC_FLUSH) #234
Comments
Pako 2.x has rewritten top level loop, more close to zlib doc. I'd suggest to inspect this part https://github.com/nodeca/pako/blob/master/lib/deflate.js#L200-L267. In worst case, you could create your own wrapper (that's plan B) |
Also see 4e8ff8e Seems Z_SYNC_FLUSH was dropped in process of wrapper rewrite - it was not clear how to do it, and how to test. |
That's super unfortunate. We rely on this for rolling compression over WebSockets. Could you re-implement this pls? Seems I'm not the only person with the same issue. Otherwise what is the wrapper solution? Can I access the chunks before a flush occurs? |
https://github.com/nodeca/pako/blob/master/lib/deflate.js - this is wrapper around ported zlib code. It's quite small. But it's not trivial to make it universal for all possible use cases.
|
Many thanks for your rapid support 👍 |
I would like to contribute and write tests for this functionality, but time and knowledge of this lib is a boundary unfortunately. I hope this is re-introduced at some point so we can keep our WebSocket lib up-to-date. Thanks for a great lib 👏 its just a shame that there is now a wheel missing that used to be there 😄 |
You can try to propose tests only (disabled by default with |
https://github.com/nodeca/pako/blob/master/lib/deflate.js#L258 as far as i see, wrapper should flush buffers as expected, if you pass Z_SYNC_FLUSH (flush > 0). So, you can extract deflated data from |
Closing, see #234 (comment) |
We recently upgraded pako from v1.011 to v2.0.3
This has broken our tests and build. I thought it was just the breaking constants, however it seems something else has also broken. The deflator now returns undefined when using Z_SYNC_FLUSH:
Pako v1.0.11
Pako v2.0.3
Is this a bug or could you provide a suggestion?
The text was updated successfully, but these errors were encountered: