From 53f54e7754a93ba7d6c0cd7ce423f5e26cd13836 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 2 Jul 2013 09:07:54 +1000 Subject: [PATCH] Lower Chunk Compression Use a chunk compression level of 4 - this provides an optimal balance between speed and compression. diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java index 7169ec8..3006712 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java @@ -24,7 +24,7 @@ public class PacketPlayOutMapChunk extends Packet { this.b = chunk.locZ; this.inflatedBuffer = flag; ChunkMap chunkmap = a(chunk, flag, i); - Deflater deflater = new Deflater(-1); + Deflater deflater = new Deflater(4); // Spigot this.d = chunkmap.c; this.c = chunkmap.b; diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java index c3cfdc7..8e1c4cb 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java +++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java @@ -22,7 +22,7 @@ public class PacketPlayOutMapChunkBulk extends Packet { @Override protected Deflater initialValue() { // Don't use higher compression level, slows things down too much - return new Deflater(6); + return new Deflater(4); // Spigot 6 -> 4 } }; // CraftBukkit end -- 1.8.3.2