Open
Description
What can't you do right now?
I have this use case. I'd like to concatenate deflate streams, so I need to use Z_SYNC_FLUSH
before finishing the stream to have deterministic trailing bytes. Without this, I would have to inflate the stream to know where it finishes.
An optimal solution
When invoking .push(...)
, add a parameter to ask for a sync flush, ex:
stream.push(data, SYNC_FLUSH)
How is this done by other libraries?
Pako allows to pass an arbitrary flush mode to push
: https://github.com/nodeca/pako/blob/62cb729e7813176ce2d2694b89c8724680fca383/lib/deflate.js#L178-L200
Metadata
Metadata
Assignees
Labels
No labels