Class Lz4FrameDecompressor.Builder
java.lang.Object
io.netty.handler.codec.compression.Decompressor.AbstractDecompressorBuilder
io.netty.handler.codec.compression.Lz4FrameDecompressor.Builder
- Enclosing class:
Lz4FrameDecompressor
@UnstableApi
public static final class Lz4FrameDecompressor.Builder
extends Decompressor.AbstractDecompressorBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild(ByteBufAllocator allocator) TheChecksuminstance to use to check data for integrity.Enable checksum validation using the default checksum, xxhash.factory(net.jpountz.lz4.LZ4Factory factory) User customizableLZ4Factoryinstance which may be JNI bindings to the original C implementation, a pure Java implementation or a Java implementation that uses theUnsafe.maxDecompressedLength(int maxDecompressedLength) Set the maximum allowed decompressed block length.
-
Method Details
-
factory
User customizableLZ4Factoryinstance which may be JNI bindings to the original C implementation, a pure Java implementation or a Java implementation that uses theUnsafe.- Parameters:
factory- The factory to use- Returns:
- This builder
-
checksum
TheChecksuminstance to use to check data for integrity. By default, no checksum validation is performed.- Parameters:
checksum- The checksum to use- Returns:
- This builder
-
defaultChecksum
Enable checksum validation using the default checksum, xxhash.- Returns:
- This builder
-
maxDecompressedLength
Set the maximum allowed decompressed block length. The default is 256 KiB. Use0to allow the LZ4 format maximum of 32 MiB.- Parameters:
maxDecompressedLength- maximum decompressed block length- Returns:
- This builder
-
build
- Specified by:
buildin classDecompressor.AbstractDecompressorBuilder- Throws:
DecompressionException
-