From 714ee559518883b5c87bf7540952d15cfcf01e5d Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Thu, 29 May 2025 01:51:30 +0800 Subject: [PATCH] doc: add missing options.info for ZstdOptions Source code of `class Zstd` calls ctor of parent `ZlibBase` via `super()` By inspecting `opts` in `ZlibBase` ctor, we can see `opts?.info` is further used to determine the return shapes of `*Sync()` methods in children class. This information will need to be revealed in nodejs doc. This PR is separated from the one for `BrotliOptions`, since these two changes potentially need to be backported to different minimum versions. --- doc/api/zlib.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/zlib.md b/doc/api/zlib.md index f6e8fa194d70a1..811fff06dfcc3c 100644 --- a/doc/api/zlib.md +++ b/doc/api/zlib.md @@ -1068,6 +1068,7 @@ Each Zstd-based class takes an `options` object. All options are optional. * `params` {Object} Key-value object containing indexed [Zstd parameters][]. * `maxOutputLength` {integer} Limits output size when using [convenience methods][]. **Default:** [`buffer.kMaxLength`][] +* `info` {boolean} If `true`, returns an object with `buffer` and `engine`. **Default:** `false` For example: