Class ZstdDecompressor.Builder

java.lang.Object
io.github.mahmoudimus.zstd.ZstdDecompressor.Builder
Enclosing class:
ZstdDecompressor

public static final class ZstdDecompressor.Builder extends Object
Options for ZstdDecompressor.
  • Method Details

    • maxWindowSize

      public ZstdDecompressor.Builder maxWindowSize(int 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

      public ZstdDecompressor.Builder verifyChecksums(boolean verifyChecksums)
      Sets whether to check frames' content checksums when present (default true).
      Parameters:
      verifyChecksums - whether to verify content checksums
      Returns:
      this builder
    • dictionary

      public ZstdDecompressor.Builder dictionary(ZstdDictionary 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

      public ZstdDecompressor build()
      Creates an immutable decompressor with the current settings.
      Returns:
      a new decompressor