Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-25 07:40:13 +01:00
Fix compression
Dieser Commit ist enthalten in:
Ursprung
ee1cddc6a0
Commit
2e250d24b6
@ -26,8 +26,9 @@ public class MinecraftCompressEncoder extends MessageToByteEncoder<ByteBuf> {
|
|||||||
|
|
||||||
ByteBuf compressedBuffer = ctx.alloc().buffer();
|
ByteBuf compressedBuffer = ctx.alloc().buffer();
|
||||||
try {
|
try {
|
||||||
|
int uncompressed = msg.readableBytes();
|
||||||
compressor.deflate(msg, compressedBuffer);
|
compressor.deflate(msg, compressedBuffer);
|
||||||
ProtocolUtils.writeVarInt(out, msg.readableBytes());
|
ProtocolUtils.writeVarInt(out, uncompressed);
|
||||||
out.writeBytes(compressedBuffer);
|
out.writeBytes(compressedBuffer);
|
||||||
} finally {
|
} finally {
|
||||||
compressedBuffer.release();
|
compressedBuffer.release();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren