Class PacketCompressionTables
The trained code lengths for PacketCompression: 256 values (1..15) per direction, built with BuildLengths(long[]) from a byte histogram of real traffic. The scene server's simulate report logs those histograms ("Packet compression sample") and what the code would have saved on them.
public static class PacketCompressionTables
- Inheritance
-
PacketCompressionTables
- Inherited Members
Remarks
Trained 2026-11-14 on the 08:17 UTC simulate run (50 simulated players in a crowd, two real players, 60 s): 1,684 packets to clients (220,410 bytes) and 1,815 to the server (192,547 bytes). On that sample the codes shrink the bytes to 84.6% and 61.9%, before the per-packet header. Retrain from a later run's histograms when the traffic mix changes; any complete code decodes correctly, a better-fitted one only compresses more.
Null means untrained: compression is not installed anywhere and the wire is unchanged. Both must be set together, and the client and every server must be deployed from the same build, since each side decodes with the table the other encoded with.
Fields
ToClientsLengths
Code lengths for packets a server sends to its clients.
public static readonly byte[] ToClientsLengths
Field Value
- byte[]
ToServerLengths
Code lengths for packets a client sends to a server.
public static readonly byte[] ToServerLengths
Field Value
- byte[]