Interface DiscordZstd
@NullMarked
public interface DiscordZstd
-
Method Summary
Modifier and TypeMethodDescriptionCreates a newDiscordZstdContext.createDecompressorFactory(int bufferSizeHint) Creates a newDiscordZstdDecompressorFactorywith the provided decompression buffer size.
-
Method Details
-
createContext
DiscordZstdContext createContext()Creates a newDiscordZstdContext.
This is used to keep track of streaming decompression after each input is consumed via anInputStream.- Returns:
- A new
DiscordZstdContextinstance
-
createDecompressorFactory
Creates a newDiscordZstdDecompressorFactorywith the provided decompression buffer size.- Parameters:
bufferSizeHint- A hint for the size of the buffer used for decompression, must be larger than 1024 or be equal to -2. Typically, bigger buffers mean less decompression loops, it does not change inputs or outputs- Returns:
- A new
DiscordZstdDecompressorFactoryinstance - Throws:
IllegalArgumentException- IfbufferSizeis less than 1024 and not -2
-