Skip to content

Commit

Permalink
zlib: make all zstd functions experimental
Browse files Browse the repository at this point in the history
PR-URL: #56964
Refs: #52100
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
  • Loading branch information
anonrig authored and targos committed Feb 11, 2025
1 parent 40cdf75 commit a3ca7f3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions doc/api/zlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ See [below][Brotli parameters] for more details on Brotli-specific options.

### For Zstd-based streams

> Stability: 1 - Experimental
There are equivalents to the zlib options for Zstd-based streams, although
these options have different ranges than the zlib ones:

Expand Down Expand Up @@ -720,6 +722,8 @@ These advanced options are available for controlling decompression:

### Zstd constants

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand All @@ -729,6 +733,8 @@ streams:

#### Flush operations

> Stability: 1 - Experimental
The following values are valid flush operations for Zstd-based streams:

* `zlib.constants.ZSTD_e_continue` (default for all operations)
Expand All @@ -737,6 +743,8 @@ The following values are valid flush operations for Zstd-based streams:

#### Compressor options

> Stability: 1 - Experimental
There are several options that can be set on Zstd encoders, affecting
compression efficiency and speed. Both the keys and the values can be accessed
as properties of the `zlib.constants` object.
Expand All @@ -749,12 +757,16 @@ The most important options are:

#### Pledged Source Size

> Stability: 1 - Experimental
It's possible to specify the expected total size of the uncompressed input via
`opts.pledgedSrcSize`. If the size doesn't match at the end of the input,
compression will fail with the code `ZSTD_error_srcSize_wrong`.

#### Decompressor options

> Stability: 1 - Experimental
These advanced options are available for controlling decompression:

* `ZSTD_d_windowLogMax`
Expand Down Expand Up @@ -1025,6 +1037,8 @@ the inflate and deflate algorithms.

## Class: `ZstdOptions`

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand Down Expand Up @@ -1054,6 +1068,8 @@ const stream = zlib.createZstdCompress({

## Class: `zlib.ZstdCompress`

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand All @@ -1062,6 +1078,8 @@ Compress data using the Zstd algorithm.

## Class: `zlib.ZstdDecompress`

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand Down Expand Up @@ -1243,6 +1261,8 @@ Creates and returns a new [`Unzip`][] object.

## `zlib.createZstdCompress([options])`

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand All @@ -1253,6 +1273,8 @@ Creates and returns a new [`ZstdCompress`][] object.

## `zlib.createZstdDecompress([options])`

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand Down Expand Up @@ -1609,6 +1631,8 @@ Decompress a chunk of data with [`Unzip`][].

### `zlib.zstdCompress(buffer[, options], callback)`

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand All @@ -1619,6 +1643,8 @@ added: REPLACEME

### `zlib.zstdCompressSync(buffer[, options])`

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand All @@ -1640,6 +1666,8 @@ added: REPLACEME

### `zlib.zstdDecompressSync(buffer[, options])`

> Stability: 1 - Experimental
<!-- YAML
added: REPLACEME
-->
Expand Down

0 comments on commit a3ca7f3

Please sign in to comment.