BitPacker View on Asset Store (opens in new tab)

Package details

Latest version
1.2
Last updated
First released
Unity version
2018.4.34 or later
Package size
184 KB
Files
15
Favorites
22
Views in the past week
5

Price tracking

Last checked
Tracked since
Lowest recorded
$19.99 on

Keywords

BitPacker

by Stefander Games (opens in new tab)

No ratings yet

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!

Price $39.99

Buy on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for BitPacker, 6 months Current $39.99; lowest $39.99; highest $39.99 in this period. $0 $25 $50 Jun Jul Aug Sep Oct Nov

Asset preview

1 / 5

BitPacker screenshot 1

BitPacker screenshot 1

About this asset

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

From the publisher's Asset Store listing.

Technical details

BitSerializer

The fully featured serializer, built on top of the BitWriter and BitReader tools, is responsible for squeezing preexisting data classes (also commonly models) into as few bits as possible, without having to write any code. On top of (unsigned) integers, Booleans and bytes, it also supports a wide range of other built-in types, such as string, Vector3, Quaternion and Guid.

BitWriter

To have more control over what is written and how it is written, you can use this class directly. Depending on your needs, you can write to any Stream or preexisting byte array. It provides a wide range of convenient methods that allow you to quickly lay down the groundwork for any type of data you might need.

BitReader

Once you’ve written out data using BitWriter, you can use the complimenting methods to read the data back out again. Like BitWriter, it supports reading from either a Stream or a preexisting byte array.

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
2019.4.23f1 Compatible Compatible Compatible Compatible

As listed on the Asset Store.