Class ZstdDecompressionSettings

java.lang.Object
org.apache.pekko.stream.ZstdDecompressionSettings

public final class ZstdDecompressionSettings extends Object
Settings for the zstd decompression operators, Compression.zstdDecompress in the Scala and Java DSLs.

Since:
2.0.0
  • Constructor Details

    • ZstdDecompressionSettings

      public ZstdDecompressionSettings()
  • Method Details

    • apply

      public static ZstdDecompressionSettings apply()
      Scala API: the default settings, chunks of at most Compression.ZstdDecompressMaxBlockSize bytes, the libzstd window limit and no dictionary
    • create

      public static ZstdDecompressionSettings create()
      Java API: the default settings, chunks of at most Compression.ZstdDecompressMaxBlockSize bytes, the libzstd window limit and no dictionary
    • maxBytesPerChunk

      public int maxBytesPerChunk()
    • windowLogMax

      public int windowLogMax()
    • withMaxBytesPerChunk

      public ZstdDecompressionSettings withMaxBytesPerChunk(int maxBytesPerChunk)
      The maximum length of the emitted ByteStrings. Defaults to Compression.ZstdDecompressMaxBlockSize.
    • withWindowLogMax

      public ZstdDecompressionSettings withWindowLogMax(int windowLogMax)
      The log2 of the largest window that a frame may use, frames that need a larger window fail the stream before the window buffer is allocated. 0 (the default) uses the libzstd limit of 27 (128 MiB), otherwise it must be greater or equal to Compression.ZstdMinWindowLog and less than or equal to Compression.ZstdMaxWindowLog. For example, RFC 9659 limits the HTTP zstd content-coding to a window log of 23 (8 MiB).

      A value other than 0 requires zstd-jni 1.5.7-25 or later. With an older version, materializing the decompression operator fails with an UnsupportedOperationException.

    • withDictionary

      public ZstdDecompressionSettings withDictionary(ZstdDictionary dictionary)
      Scala API: decompress with a dictionary, which must be the one used for compression. Its level is ignored.
    • withDictionary

      public ZstdDecompressionSettings withDictionary(ZstdDictionary dictionary)
      Java API: decompress with a dictionary, which must be the one used for compression. Its level is ignored.
    • withoutDictionary

      public ZstdDecompressionSettings withoutDictionary()
      Decompress without a dictionary, the default.
    • toString

      public String toString()
      Overrides:
      toString in class Object