mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 07:32:03 -07:00
Add support for lz4 (#12053)
Mojang added this early 2024, however, it wasn't ever added to the actual config option inside of paper
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/world/level/chunk/storage/RegionFileVersion.java
|
--- a/net/minecraft/world/level/chunk/storage/RegionFileVersion.java
|
||||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFileVersion.java
|
+++ b/net/minecraft/world/level/chunk/storage/RegionFileVersion.java
|
||||||
@@ -61,6 +_,15 @@
|
@@ -61,6 +_,16 @@
|
||||||
private final RegionFileVersion.StreamWrapper<InputStream> inputWrapper;
|
private final RegionFileVersion.StreamWrapper<InputStream> inputWrapper;
|
||||||
private final RegionFileVersion.StreamWrapper<OutputStream> outputWrapper;
|
private final RegionFileVersion.StreamWrapper<OutputStream> outputWrapper;
|
||||||
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
+ return switch (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.compressionFormat) {
|
+ return switch (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.compressionFormat) {
|
||||||
+ case GZIP -> VERSION_GZIP;
|
+ case GZIP -> VERSION_GZIP;
|
||||||
+ case ZLIB -> VERSION_DEFLATE;
|
+ case ZLIB -> VERSION_DEFLATE;
|
||||||
|
+ case LZ4 -> VERSION_LZ4;
|
||||||
+ case NONE -> VERSION_NONE;
|
+ case NONE -> VERSION_NONE;
|
||||||
+ };
|
+ };
|
||||||
+ }
|
+ }
|
||||||
|
@@ -186,6 +186,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
|||||||
public enum CompressionFormat {
|
public enum CompressionFormat {
|
||||||
GZIP,
|
GZIP,
|
||||||
ZLIB,
|
ZLIB,
|
||||||
|
LZ4,
|
||||||
NONE
|
NONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user