diff --git a/src/main/java/com/viaversion/aas/codec/CompressionCodec.java b/src/main/java/com/viaversion/aas/codec/CompressionCodec.java index c9bfdbc..83ccd3c 100644 --- a/src/main/java/com/viaversion/aas/codec/CompressionCodec.java +++ b/src/main/java/com/viaversion/aas/codec/CompressionCodec.java @@ -14,9 +14,7 @@ import java.util.List; public class CompressionCodec extends MessageToMessageCodec { // stolen from Krypton (GPL) and modified // https://github.com/astei/krypton/blob/master/src/main/java/me/steinborn/krypton/mod/shared/network/compression/MinecraftCompressEncoder.java - private static final int VANILLA_MAXIMUM_UNCOMPRESSED_SIZE = 8 * 1024 * 1024; // 8MiB - private static final int HARD_MAXIMUM_UNCOMPRESSED_SIZE = 16 * 1024 * 1024; // 16MiB - private static final int UNCOMPRESSED_CAP = java.lang.Boolean.getBoolean("velocity.increased-compression-cap") ? HARD_MAXIMUM_UNCOMPRESSED_SIZE : VANILLA_MAXIMUM_UNCOMPRESSED_SIZE; + private static final int UNCOMPRESSED_CAP = 8 * 1024 * 1024; // 8MiB private final int threshold; private VelocityCompressor compressor; diff --git a/src/main/kotlin/com/viaversion/aas/Util.kt b/src/main/kotlin/com/viaversion/aas/Util.kt index e0584b9..437e79d 100644 --- a/src/main/kotlin/com/viaversion/aas/Util.kt +++ b/src/main/kotlin/com/viaversion/aas/Util.kt @@ -215,7 +215,8 @@ fun sha512Hex(data: ByteArray): String { fun eventLoopGroup(): EventLoopGroup { return when { - //IOUring.isAvailable() -> IOUringEventLoopGroup() // experimental + System.getProperty("com.viaversion.aas.io_uring").toBoolean() + && IOUring.isAvailable() -> IOUringEventLoopGroup() // experimental Epoll.isAvailable() -> EpollEventLoopGroup() KQueue.isAvailable() -> KQueueEventLoopGroup() else -> NioEventLoopGroup()