mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 06:11:06 +00:00
Ah yes
This commit is contained in:
@@ -84,12 +84,12 @@ public class TectonicPlate {
|
|||||||
public static TectonicPlate read(int worldHeight, File file) throws IOException, ClassNotFoundException {
|
public static TectonicPlate read(int worldHeight, File file) throws IOException, ClassNotFoundException {
|
||||||
FileInputStream fin = new FileInputStream(file);
|
FileInputStream fin = new FileInputStream(file);
|
||||||
DataInputStream din;
|
DataInputStream din;
|
||||||
if (file.getName().endsWith("ttp.lz4")) {
|
if (file.getName().endsWith("ttp.lz4b")) {
|
||||||
GZIPInputStream gzi = new GZIPInputStream(fin);
|
|
||||||
din = new DataInputStream(gzi);
|
|
||||||
} else {
|
|
||||||
LZ4BlockInputStream lz4 = new LZ4BlockInputStream(fin);
|
LZ4BlockInputStream lz4 = new LZ4BlockInputStream(fin);
|
||||||
din = new DataInputStream(lz4);
|
din = new DataInputStream(lz4);
|
||||||
|
} else {
|
||||||
|
GZIPInputStream gzi = new GZIPInputStream(fin);
|
||||||
|
din = new DataInputStream(gzi);
|
||||||
}
|
}
|
||||||
TectonicPlate p = new TectonicPlate(worldHeight, din);
|
TectonicPlate p = new TectonicPlate(worldHeight, din);
|
||||||
din.close();
|
din.close();
|
||||||
@@ -175,12 +175,12 @@ public class TectonicPlate {
|
|||||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||||
FileOutputStream fos = new FileOutputStream(file);
|
FileOutputStream fos = new FileOutputStream(file);
|
||||||
DataOutputStream dos;
|
DataOutputStream dos;
|
||||||
if (file.getName().endsWith("ttp")) {
|
if (file.getName().endsWith("ttp.lz4b")) {
|
||||||
GZIPOutputStream gzo = new GZIPOutputStream(fos);
|
|
||||||
dos = new DataOutputStream(gzo);
|
|
||||||
} else {
|
|
||||||
LZ4BlockOutputStream lz4 = new LZ4BlockOutputStream(fos);
|
LZ4BlockOutputStream lz4 = new LZ4BlockOutputStream(fos);
|
||||||
dos = new DataOutputStream(lz4);
|
dos = new DataOutputStream(lz4);
|
||||||
|
} else {
|
||||||
|
GZIPOutputStream gzo = new GZIPOutputStream(fos);
|
||||||
|
dos = new DataOutputStream(gzo);
|
||||||
}
|
}
|
||||||
write(dos);
|
write(dos);
|
||||||
dos.close();
|
dos.close();
|
||||||
|
|||||||
Reference in New Issue
Block a user