Class ZstdUtils
java.lang.Object
org.apache.commons.compress.compressors.zstandard.ZstdUtils
Utility code for the Zstandard compression format.
- Since:
- 1.16
- This class is thread-safe
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Are the classes required to support Zstandard compression available?static boolean
matches
(byte[] signature, int length) Checks if the signature matches what is expected for a Zstandard file.static void
setCacheZstdAvailablity
(boolean doCache) Whether to cache the result of the Zstandard for Java check.
-
Method Details
-
isZstdCompressionAvailable
Are the classes required to support Zstandard compression available?- Returns:
- true if the classes required to support Zstandard compression are available
-
matches
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
-
setCacheZstdAvailablity
Whether to cache the result of the Zstandard for Java check.This defaults to
false
in an OSGi environment andtrue
otherwise.- Parameters:
doCache
- whether to cache the result
-