Package io.github.mahmoudimus.zstd
Class ZstdDecompressor.Builder
java.lang.Object
io.github.mahmoudimus.zstd.ZstdDecompressor.Builder
- Enclosing class:
ZstdDecompressor
Options for
ZstdDecompressor.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an immutable decompressor with the current settings.dictionary(ZstdDictionary dictionary) Makes a dictionary available to frames that name its ID.maxWindowSize(int maxWindowSize) Rejects frames whose window (history) is larger than this many bytes.verifyChecksums(boolean verifyChecksums) Sets whether to check frames' content checksums when present (default true).
-
Method Details
-
maxWindowSize
Rejects frames whose window (history) is larger than this many bytes.- Parameters:
maxWindowSize- maximum history size in bytes, at least 1 KiB- Returns:
- this builder
- Throws:
IllegalArgumentException- if the limit is less than 1 KiB
-
verifyChecksums
Sets whether to check frames' content checksums when present (default true).- Parameters:
verifyChecksums- whether to verify content checksums- Returns:
- this builder
-
dictionary
Makes a dictionary available to frames that name its ID. A raw-content dictionary (ID 0) is used for frames that name no dictionary.- Parameters:
dictionary- dictionary to register, replacing any dictionary with the same ID- Returns:
- this builder
-
build
Creates an immutable decompressor with the current settings.- Returns:
- a new decompressor
-