mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-01-06 15:51:30 +00:00
switch to lz4 block compression
This commit is contained in:
@@ -110,7 +110,7 @@ public class Mantle {
|
||||
* @return the file
|
||||
*/
|
||||
public static File fileForRegion(File folder, Long key) {
|
||||
File f = new File(folder, "p." + key + ".ttp.lz4");
|
||||
File f = new File(folder, "p." + key + ".ttp.lz4b");
|
||||
if (!f.getParentFile().exists()) {
|
||||
f.getParentFile().mkdirs();
|
||||
}
|
||||
@@ -552,7 +552,7 @@ public class Mantle {
|
||||
|
||||
File file = fileForRegion(dataFolder, x, z);
|
||||
if (!file.exists())
|
||||
file = new File(dataFolder, file.getName().substring(".lz4".length()));
|
||||
file = new File(dataFolder, file.getName().substring(".lz4b".length()));
|
||||
|
||||
if (file.exists()) {
|
||||
try {
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.scheduling.PrecisionStopwatch;
|
||||
import lombok.Getter;
|
||||
import net.jpountz.lz4.LZ4BlockInputStream;
|
||||
import net.jpountz.lz4.LZ4BlockOutputStream;
|
||||
import net.jpountz.lz4.LZ4FrameInputStream;
|
||||
import net.jpountz.lz4.LZ4FrameOutputStream;
|
||||
|
||||
@@ -87,7 +88,7 @@ public class TectonicPlate {
|
||||
GZIPInputStream gzi = new GZIPInputStream(fin);
|
||||
din = new DataInputStream(gzi);
|
||||
} else {
|
||||
LZ4FrameInputStream lz4 = new LZ4FrameInputStream(fin);
|
||||
LZ4BlockInputStream lz4 = new LZ4BlockInputStream(fin);
|
||||
din = new DataInputStream(lz4);
|
||||
}
|
||||
TectonicPlate p = new TectonicPlate(worldHeight, din);
|
||||
@@ -178,7 +179,7 @@ public class TectonicPlate {
|
||||
GZIPOutputStream gzo = new GZIPOutputStream(fos);
|
||||
dos = new DataOutputStream(gzo);
|
||||
} else {
|
||||
LZ4FrameOutputStream lz4 = new LZ4FrameOutputStream(fos);
|
||||
LZ4BlockOutputStream lz4 = new LZ4BlockOutputStream(fos);
|
||||
dos = new DataOutputStream(lz4);
|
||||
}
|
||||
write(dos);
|
||||
|
||||
Reference in New Issue
Block a user