◐ Shell
clean mode source ↗

zlib: make all zstd functions experimental · nodejs/node@a3ca7f3

@@ -496,6 +496,8 @@ See [below][Brotli parameters] for more details on Brotli-specific options.

496496497497

### For Zstd-based streams

498498499+

> Stability: 1 - Experimental

500+499501

There are equivalents to the zlib options for Zstd-based streams, although

500502

these options have different ranges than the zlib ones:

501503

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

720722721723

### Zstd constants

722724725+

> Stability: 1 - Experimental

726+723727

<!-- YAML

724728

added: REPLACEME

725729

-->

@@ -729,6 +733,8 @@ streams:

729733730734

#### Flush operations

731735736+

> Stability: 1 - Experimental

737+732738

The following values are valid flush operations for Zstd-based streams:

733739734740

* `zlib.constants.ZSTD_e_continue` (default for all operations)

@@ -737,6 +743,8 @@ The following values are valid flush operations for Zstd-based streams:

737743738744

#### Compressor options

739745746+

> Stability: 1 - Experimental

747+740748

There are several options that can be set on Zstd encoders, affecting

741749

compression efficiency and speed. Both the keys and the values can be accessed

742750

as properties of the `zlib.constants` object.

@@ -749,12 +757,16 @@ The most important options are:

749757750758

#### Pledged Source Size

751759760+

> Stability: 1 - Experimental

761+752762

It's possible to specify the expected total size of the uncompressed input via

753763

`opts.pledgedSrcSize`. If the size doesn't match at the end of the input,

754764

compression will fail with the code `ZSTD_error_srcSize_wrong`.

755765756766

#### Decompressor options

757767768+

> Stability: 1 - Experimental

769+758770

These advanced options are available for controlling decompression:

759771760772

* `ZSTD_d_windowLogMax`

@@ -1025,6 +1037,8 @@ the inflate and deflate algorithms.

1025103710261038

## Class: `ZstdOptions`

102710391040+

> Stability: 1 - Experimental

1041+10281042

<!-- YAML

10291043

added: REPLACEME

10301044

-->

@@ -1054,6 +1068,8 @@ const stream = zlib.createZstdCompress({

1054106810551069

## Class: `zlib.ZstdCompress`

105610701071+

> Stability: 1 - Experimental

1072+10571073

<!-- YAML

10581074

added: REPLACEME

10591075

-->

@@ -1062,6 +1078,8 @@ Compress data using the Zstd algorithm.

1062107810631079

## Class: `zlib.ZstdDecompress`

106410801081+

> Stability: 1 - Experimental

1082+10651083

<!-- YAML

10661084

added: REPLACEME

10671085

-->

@@ -1243,6 +1261,8 @@ Creates and returns a new [`Unzip`][] object.

1243126112441262

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

124512631264+

> Stability: 1 - Experimental

1265+12461266

<!-- YAML

12471267

added: REPLACEME

12481268

-->

@@ -1253,6 +1273,8 @@ Creates and returns a new [`ZstdCompress`][] object.

1253127312541274

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

125512751276+

> Stability: 1 - Experimental

1277+12561278

<!-- YAML

12571279

added: REPLACEME

12581280

-->

@@ -1609,6 +1631,8 @@ Decompress a chunk of data with [`Unzip`][].

1609163116101632

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

161116331634+

> Stability: 1 - Experimental

1635+16121636

<!-- YAML

16131637

added: REPLACEME

16141638

-->

@@ -1619,6 +1643,8 @@ added: REPLACEME

1619164316201644

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

162116451646+

> Stability: 1 - Experimental

1647+16221648

<!-- YAML

16231649

added: REPLACEME

16241650

-->

@@ -1640,6 +1666,8 @@ added: REPLACEME

1640166616411667

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

164216681669+

> Stability: 1 - Experimental

1670+16431671

<!-- YAML

16441672

added: REPLACEME

16451673

-->