Skip to content

zlib: Make the finish flush flag configurable

Pull Request check-list

  • Does make -j8 test (UNIX) or vcbuild test nosign (Windows) pass with this change (including linting)?
  • Is the commit message formatted according to CONTRIBUTING.md?
  • If this change fixes a bug (or a performance problem), is a regression test (or a benchmark) included?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

Affected core subsystem(s)

zlib

Description of change

Up to now, Z_FINISH was always the flushing flag that was used for the last chunk of input data. This patch makes this choice configurable so that advanced users can perform e.g. decompression of partial data using Z_SYNC_FLUSH, if that suits their needs.

This was requested in #4030 (closed) and #5761 (closed).

Fixes: https://github.com/nodejs/node/issues/5761

Merge request reports

Loading