0x03 S03PacketEnableCompression
Enables zlib compression for all subsequent packets. Sets the compression threshold — packets >= this size are compressed.
Fields
| Field | Type | Description |
|---|---|---|
| compressionThreshold | VarInt | Minimum packet size in bytes before compression is applied. -1 disables compression. |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Threshold | VarInt | Typically 256 in vanilla; -1 = disabled |
MCP References
MCP
NetHandlerLoginClient.handleEnableCompression()Handler Interface
HND
INetHandlerLoginClientNotes
After this packet, all future packets start with a VarInt prefix indicating the uncompressed length. If length=0, the data is uncompressed (smaller than threshold). If length>0, the remaining data is zlib-compressed and must be inflated.
implementation Implementation Cases
Disabler
Cancel or delay compression to prevent server-side anti-cheat from reading packets.