3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-13 22:50:06 +01:00

Shift ZSTD bindings check

Dieser Commit ist enthalten in:
NotMyFault 2021-09-16 21:56:28 +02:00
Ursprung 1dd0dac462
Commit 9fb6ebe7ac
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 158F5701A6AAD00C
2 geänderte Dateien mit 10 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -268,15 +268,16 @@ public class Fawe {
* - LocalSession supports VirtualPlayers and undo on disk
*/
if (!Settings.IMP.EXPERIMENTAL.DISABLE_NATIVES) {
// A higher amount is currently not supported by ZSTD / ZSTD JNI
if (Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL > 6 || Settings.IMP.HISTORY.COMPRESSION_LEVEL > 6) {
Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL = Math.min(6, Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL);
Settings.IMP.HISTORY.COMPRESSION_LEVEL = Math.min(6, Settings.IMP.HISTORY.COMPRESSION_LEVEL);
}
try {
Native.load();
} catch (Throwable e) {
if (Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL > 6 || Settings.IMP.HISTORY.COMPRESSION_LEVEL > 6) {
Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL = Math.min(6, Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL);
Settings.IMP.HISTORY.COMPRESSION_LEVEL = Math.min(6, Settings.IMP.HISTORY.COMPRESSION_LEVEL);
LOGGER.error("ZSTD Compression Binding Not Found.\n"
+ "FAWE will still work but compression won't work as well.\n", e);
}
LOGGER.error("ZSTD compression binding not found.\n"
+ "FAWE will still work but compression won't work as well.\n", e);
}
try {
net.jpountz.util.Native.load();

Datei anzeigen

@ -224,10 +224,12 @@ public class Settings extends Config {
"4 = 1 x medium, 1 x fast",
"5 = 1 x medium, 2 x fast",
"6 = 1 x medium, 3 x fast",
/* A higher value is currently not supported by ZSTD / ZSTD-JNI
"7 = 1 x high, 1 x medium, 1 x fast",
"8 = 1 x high, 1 x medium, 2 x fast",
"9 = 1 x high, 1 x medium, 3 x fast (best compression)",
"NOTE: If using disk, do some compression (3+) as smaller files save faster"
*/
})
public int COMPRESSION_LEVEL = 3;
@Comment({
@ -500,7 +502,7 @@ public class Settings extends Config {
" - TODO: Buffered random access with compression is not implemented on disk yet",
" - 0 = No compression",
" - 1 = Fast compression",
" - 2-17 = Slower compression"
" - 2-6 = Slower compression"
})
public int COMPRESSION_LEVEL = 1;
@Comment("Number of days to keep history on disk before deleting it")