mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
doc: add missing Zstd strategy constants
PR-URL: https://github.com/nodejs/node/pull/59312 Fixes: https://github.com/nodejs/node/issues/59290 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
3755e8b144
commit
ef58be6f0c
|
|
@ -750,6 +750,34 @@ The most important options are:
|
|||
* `ZSTD_c_compressionLevel`
|
||||
* Set compression parameters according to pre-defined cLevel table. Default
|
||||
level is ZSTD\_CLEVEL\_DEFAULT==3.
|
||||
* `ZSTD_c_strategy`
|
||||
* Select the compression strategy.
|
||||
* Possible values are listed in the strategy options section below.
|
||||
|
||||
#### Strategy options
|
||||
|
||||
The following constants can be used as values for the `ZSTD_c_strategy`
|
||||
parameter:
|
||||
|
||||
* `zlib.constants.ZSTD_fast`
|
||||
* `zlib.constants.ZSTD_dfast`
|
||||
* `zlib.constants.ZSTD_greedy`
|
||||
* `zlib.constants.ZSTD_lazy`
|
||||
* `zlib.constants.ZSTD_lazy2`
|
||||
* `zlib.constants.ZSTD_btlazy2`
|
||||
* `zlib.constants.ZSTD_btopt`
|
||||
* `zlib.constants.ZSTD_btultra`
|
||||
* `zlib.constants.ZSTD_btultra2`
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
const stream = zlib.createZstdCompress({
|
||||
params: {
|
||||
[zlib.constants.ZSTD_c_strategy]: zlib.constants.ZSTD_btultra,
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
#### Pledged Source Size
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user