Class ZstdCompression$
java.lang.Object
org.apache.pekko.serialization.jackson.ZstdCompression$
INTERNAL API
zstd compression of serialized payloads. zstd-jni is an optional dependency, so it is only
referenced from this object and only used when zstd is configured or a zstd payload is
deserialized. A missing zstd-jni (or a platform without its native library) is reported as an
IllegalArgumentException rather than a LinkageError.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ZstdCompression$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckLevel(int level) Fails if zstd-jni is not available or `level` is not a valid zstd compression level.byte[]compress(byte[] bytes, int level) byte[]decompress(byte[] bytes, long maxDecompressedSize, String settingPath) Decompress a zstd payload, failing with anIllegalArgumentExceptiononce it would exceedmaxDecompressedSizebytes, so a small payload cannot expand without limit.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
ZstdCompression$
public ZstdCompression$()
-
-
Method Details
-
checkLevel
public void checkLevel(int level) Fails if zstd-jni is not available or `level` is not a valid zstd compression level. -
compress
public byte[] compress(byte[] bytes, int level) -
decompress
Decompress a zstd payload, failing with anIllegalArgumentExceptiononce it would exceedmaxDecompressedSizebytes, so a small payload cannot expand without limit. A negativemaxDecompressedSizeapplies no limit.settingPathis named in the error message.
-