BitPacker


BitPacker is a collection of tools for efficiently writing and reading data without letting any bit go to waste. Use it to optimize your network messages, save data and more!


by Stefander Games


Price History +

Save and network data is getting incredibly complex in modern games. Unfortunately, commonly used serialization (such as XML/JSON and BinaryFormatter) doesn't tightly pack your data, resulting in large chunks of unused bits. As many network and gameplay programmers know, manually writing code for tightly packing the data using bitfields is incredibly time consuming and complex, especially when dealing with data that can spill over into other bytes.


BitPacker aims to solve this problem by stripping away all unnecessary and duplicated information and utilizing every single bit to the fullest, resulting in the smallest outputs possible. It has been battle tested for performance and ease of use, and it’s currently being used in multiple big productions, including the Besiege multiplayer and level editor code (by Spiderling Studios) and The Falconeer (by Tomas Sala).


HIGHLIGHTS

- Easy to use read/write API

- A fully featured serializer that supports many of Unity's built-in types

- Intelligent integer and string packing and quaternion optimizations

- Use powerful arguments to help shrink the data size even more

- Detailed examples with line-by-line comments for BitPacker's common methods

- Includes the full source code