| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 3109297 commit e6a6cdb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -750,6 +750,34 @@ The most important options are: | |||
| 750 | 750 | * `ZSTD_c_compressionLevel` | |
| 751 | 751 | * Set compression parameters according to pre-defined cLevel table. Default | |
| 752 | 752 | level is ZSTD\_CLEVEL\_DEFAULT==3. | |
| 753 | + * `ZSTD_c_strategy` | ||
| 754 | + * Select the compression strategy. | ||
| 755 | + * Possible values are listed in the strategy options section below. | ||
| 756 | + | ||
| 757 | + #### Strategy options | ||
| 758 | + | ||
| 759 | + The following constants can be used as values for the `ZSTD_c_strategy` | ||
| 760 | + parameter: | ||
| 761 | + | ||
| 762 | + * `zlib.constants.ZSTD_fast` | ||
| 763 | + * `zlib.constants.ZSTD_dfast` | ||
| 764 | + * `zlib.constants.ZSTD_greedy` | ||
| 765 | + * `zlib.constants.ZSTD_lazy` | ||
| 766 | + * `zlib.constants.ZSTD_lazy2` | ||
| 767 | + * `zlib.constants.ZSTD_btlazy2` | ||
| 768 | + * `zlib.constants.ZSTD_btopt` | ||
| 769 | + * `zlib.constants.ZSTD_btultra` | ||
| 770 | + * `zlib.constants.ZSTD_btultra2` | ||
| 771 | + | ||
| 772 | + Example: | ||
| 773 | + | ||
| 774 | + ```js | ||
| 775 | + const stream = zlib.createZstdCompress({ | ||
| 776 | + params: { | ||
| 777 | + [zlib.constants.ZSTD_c_strategy]: zlib.constants.ZSTD_btultra, | ||
| 778 | + }, | ||
| 779 | + }); | ||
| 780 | + ``` | ||
| 753 | 781 | ||
| 754 | 782 | #### Pledged Source Size | |
| 755 | 783 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments