Function tsproto::algorithms::compress_and_split[][src]

pub fn compress_and_split(is_client: bool, packet: OutPacket) -> Vec<OutPacket>
Expand description

Compresses and splits the packet data of a Command or CommandLow packet.

Returns the splitted packet data and their headers. The headers have their type and the compressed and fragmented flag set to the right value.

Returns an error if the packet is too large but cannot be splitted. Only Command and CommandLow packets can be compressed and splitted.