Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zlib: make all zstd functions experimental #56964

Merged
merged 1 commit into from
Feb 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading