Moved LZ4 to its own class to male LZ4 optional
parent
16c4fcaff5
commit
0553cce310
|
@ -24,6 +24,17 @@ import java.io.InputStream
|
|||
import java.security.NoSuchAlgorithmException
|
||||
|
||||
object LZ4Util {
|
||||
init {
|
||||
try {
|
||||
Class.forName("net.jpountz.xxhash.XXHashFactory")
|
||||
}
|
||||
catch (e: Exception) {
|
||||
System.err.println("Please add the LZMA library to your classpath, for example: implementation(\"org.lz4:lz4-java:1.8.0\")")
|
||||
throw e
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private val xxHashFactory: ThreadLocal<XXHashFactory> by lazy {
|
||||
ThreadLocal.withInitial {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue