unstale

npm / pako

pako

What changed in pako 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.

11 breaking4 new APIs and options2 performance1 tooling7 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.12 on npm

pako 319 changes

Breaking changes 9

  • The Uint8Array type is narrowed to ArrayBuffer only.

    3.0.1release notes

  • Inflate no longer collects gzip headers automatically; use .onStart() with zlibInflateGetHeader() to read gzip metadata.

    3.0.0release notes

  • The option now accepts only Uint8Array or ArrayBuffer; String is no longer accepted.

    3.0.0release notes

  • High-level helpers use { toText: true } instead of { to: 'string' } for UTF-8 text output.

    3.0.0release notes

  • Calling Inflate.push() after stream end returns the decode result instead of always returning false.

    3.0.0release notes

  • The default is now false, making binary output compatible with nodejs by default.

    3.0.0release notes

  • Now only assembles output chunks into result and no longer sets the err or msg fields.

    3.0.0release notes

  • Package files layout changed; consult package.json for supported entry points.

    3.0.0release notes

  • String conversion now uses native TextEncoder and TextDecoder; shims were removed.

    3.0.0release notes

New APIs and options 3

  • Exports the Z_Strategy type for compression strategy options.

    3.0.3release notes

  • Adds hooks for advanced stream setup.

    3.0.0release notes

  • Low-level zlib API exports are now available.

    3.0.0release notes

Performance 1

Tooling 1

Fixes and other changes 5

  • Restores compression strategy constant exports.

    3.0.3release notes

  • Enforces the 65536-character limit when collecting gzip header names and comments.

    3.0.3release notes

  • Gzip header time is read as an unsigned 32-bit value, fixing negative timestamps from 2038 onward.

    3.0.2release notes

  • Block type selection with Z_FIXED avoids fixed blocks when stored blocks would be smaller.

    3.0.2release notes

  • A Z_STREAM_ERROR check was added for a condition reachable only through a wrong options call.

    3.0.1release notes

pako 26 changes

Breaking changes 2

New APIs and options 1

  • Adds a deflate option, defaulting to true, to switch between original zlib and nodejs binary-compatible output.

    2.2.0release notes

Performance 1

  • An alternate deflate hash provides nodejs zlib-compatible output and about a 40% speed boost.

    2.2.0release notes

Fixes and other changes 2

  • Inflate now emits a chunk on flush.

    2.2.0release notes

  • Fixes the inflate window not being updated after inflateReset, including for multistream and bgzip.

    2.2.0release notes