Packet:PacketFooter

From SWGANH Wiki
Jump to: navigation, search

Packet Footers:

Every packet in SWG, regardless wether it is just SOE Protocol, just an SWG Packet, or a combination of the both, has a footer.


The footer's format is as follows:

[Compression Flag: 1 byte][CRC value:2 bytes] total of 3 bytes [CompFlag][CRC1][CRC2]


The checksum algorithm used is a seeded CRC32 checksum of all the data in a packet EXCEPT the crc value located in the footer (so that includes the compression flag). The CRC is calculated after the compression and then encryption are both applied.


The compression used is a default level ZLIB compression applied on the data BETWEEN the SOE opcode(part of the SOE Protocol) and the footer. So far no record has been made of a compressed packet that is NOT inside the SOE Protocol. If the packet is compressed, the Compression Flag (CompFlag) is a 1. Uncompressed packets have a Compression Flag (CompFlag) of 0.