Skip to content

Commit e834af9

Browse files
committed
Increase max ratio
Older versions of the game, and creative mode, send itemstacks to the server when dealing with itemstacks, annoying, the compression algo used is good at backreferencing, which means that compressed data can balloon pretty well. 64 should more than cover most cases of legit data, we could probably be more harsh here, but this is likely a fine balance between avoiding bombs and not erring out on legit data.
1 parent affc1d6 commit e834af9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

proxy/src/main/java/com/velocitypowered/proxy/protocol/netty/MinecraftCompressDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class MinecraftCompressDecoder extends MessageToMessageDecoder<ByteBuf> {
4444
Boolean.getBoolean("velocity.increased-compression-cap")
4545
? HARD_MAXIMUM_UNCOMPRESSED_SIZE : SERVERBOUND_MAXIMUM_UNCOMPRESSED_SIZE;
4646
private static final boolean SKIP_COMPRESSION_VALIDATION = Boolean.getBoolean("velocity.skip-uncompressed-packet-size-validation");
47-
private static final double MAX_COMPRESSION_RATIO = Double.parseDouble(System.getProperty("velocity.max-compression-ratio", "10"));
47+
private static final double MAX_COMPRESSION_RATIO = Double.parseDouble(System.getProperty("velocity.max-compression-ratio", "64"));
4848
private final ProtocolUtils.Direction direction;
4949

5050
private int threshold;

0 commit comments

Comments
 (0)