Bit-streams

Source-2 uses network order (little endian) bit-streams when sending data to clients, this comes with the advantage of compact wire messages, and ease of implementation.

Writers Note:

I am of-course joking about it being easy, Bit Reading was the source of many of our bugs throughout our development process, and took 4 attempts to get it right. It's hard to debug, and with the only documentation being other peoples code (specifically manta), it's a fucker to get working.

Bit-streams are used in a variety of places, including but not limited to:

  • Game Packets
  • Entity Updates
  • String Tables

This set of chapters aims to document the format of the bit-streams and its many types. However, it's no substitute to looking over some code; you can find our implementation here