mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-13 04:53:55 +00:00
refactor: Remove lz4-stream
LZ4-Java contains a modern version & delegate for lz4-java-stream.
This commit is contained in:
@ -55,7 +55,6 @@ dependencies {
|
||||
implementation(libs.zstd) { isTransitive = false }
|
||||
api(libs.paster)
|
||||
compileOnly(libs.lz4Java) { isTransitive = false }
|
||||
compileOnly(libs.lz4JavaStream) { isTransitive = false }
|
||||
compileOnly(libs.sparsebitset)
|
||||
compileOnly(libs.parallelgzip) { isTransitive = false }
|
||||
antlr(libs.antlr4)
|
||||
|
@ -31,7 +31,6 @@ import net.jpountz.lz4.LZ4BlockOutputStream;
|
||||
import net.jpountz.lz4.LZ4Compressor;
|
||||
import net.jpountz.lz4.LZ4Factory;
|
||||
import net.jpountz.lz4.LZ4FastDecompressor;
|
||||
import net.jpountz.lz4.LZ4InputStream;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
@ -360,12 +359,8 @@ public class MainUtil {
|
||||
if (mode == 0) {
|
||||
return new FaweInputStream(is);
|
||||
}
|
||||
boolean legacy;
|
||||
if (mode >= 10) {
|
||||
legacy = false;
|
||||
mode = -mode + 10;
|
||||
} else {
|
||||
legacy = true;
|
||||
}
|
||||
if (mode == 0) {
|
||||
return new FaweInputStream(is);
|
||||
@ -380,11 +375,7 @@ public class MainUtil {
|
||||
}
|
||||
amountAbs = (1 + ((amountAbs - 1) % 3)) + (amountAbs > 3 ? 1 : 0);
|
||||
for (int i = 0; i < amountAbs; i++) {
|
||||
if (legacy) {
|
||||
is = new LZ4InputStream(is);
|
||||
} else {
|
||||
is = new LZ4BlockInputStream(is);
|
||||
}
|
||||
is = new LZ4BlockInputStream(is);
|
||||
}
|
||||
return new FaweInputStream(new FastBufferedInputStream(is));
|
||||
}
|
||||
|
Reference in New Issue
Block a user