Class ZstdUtils
java.lang.Object
kala.compress.compressors.zstandard.ZstdUtils
Utility code for the Zstandard compression format.
- Since:
- 1.16
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]Skippable Frame Magic Bytes - the three common bytes.private static final byte[]Zstandard Frame Magic Bytes. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor to prevent instantiation of this utility class. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanAre the classes required to support Zstandard compression available?static booleanmatches(byte[] signature, int length) Checks if the signature matches what is expected for a Zstandard file.
-
Field Details
-
ZSTANDARD_FRAME_MAGIC
private static final byte[] ZSTANDARD_FRAME_MAGICZstandard Frame Magic Bytes. -
SKIPPABLE_FRAME_MAGIC
private static final byte[] SKIPPABLE_FRAME_MAGICSkippable Frame Magic Bytes - the three common bytes.
-
-
Constructor Details
-
ZstdUtils
private ZstdUtils()Private constructor to prevent instantiation of this utility class.
-
-
Method Details
-
isZstdCompressionAvailable
public static boolean isZstdCompressionAvailable()Are the classes required to support Zstandard compression available?- Returns:
- true if the classes required to support Zstandard compression are available
-
matches
public static boolean matches(byte[] signature, int length) Checks if the signature matches what is expected for a Zstandard file.- Parameters:
signature- the bytes to checklength- the number of bytes to check- Returns:
- true if signature matches the Ztstandard or skippable frame magic bytes, false otherwise
-