Bitstream – Binary Framework

Hello everyone,

I’m happy to release Bitstream, the successor to the Buffer module. Bitstream is a complete rewrite and a brand new project, rebuilt from the ground up as a full framework rather than a simple library.

While Bitstream builds on the concepts introduced by Buffer, it goes far beyond, offering a complete architecture for binary serialization, custom type handling, and structured data management.

Bitstream Repository


Bitstream Release


Why Bitstream?

Buffer was originally designed as a lightweight utility for binary manipulation. Over time, the need for a more powerful and structured solution became clear, especially for developers working with:

  • Networking and remote data compression
  • Save systems and data storage optimization
  • Custom protocols and low-level data handling
  • Performance-critical serialization pipelines

Bitstream is the answer to those needs, providing a robust and extensible framework designed with real production use cases in mind.


Key Features

  • 60+ built-in types, covering integers, floats, Roblox datatypes (CFrame, Vector, Color3, UDim, etc.), sequences, curves and more
  • Multiple precision variations for most complex types (F16, F24, F32, F64, Quantized, Quaternion…)
  • Schemaless serialization for dynamic and flexible data structures
  • Structured types with Array, Struct and Instance support
  • Compact binary output for optimized bandwidth and storage
  • Extensible architecture designed to grow with your project

Supported Types

Bitstream supports a wide range of built-in types, organized by category. Click each section to expand.

Integers (signed & unsigned)
Signed Unsigned
I8 U1
I16 U8
I24 U16
I32 U24
I40 U32
I48 U40
I54 U48
— U54

Note: U1 is a single-bit unsigned integer, useful for compact boolean-like flags.

Floating point numbers
Type Description
F8 8-bit floating point (ultra compact)
F16 16-bit floating point (half precision)
F24 24-bit floating point
F32 32-bit floating point (single precision)
F64 64-bit floating point (double precision)
Strings
Type Description
String Standard string
PrefixedString String with a length prefix for faster parsing
Booleans
Type Description
Bool1 Single-bit boolean (most compact)
Bool8 Byte-aligned boolean
Vectors

Vector2

  • Vector2float24
  • Vector2float32
  • Vector2int16
  • Vector2uint16
  • Vector2

Vector3

  • Vector3float24
  • Vector3float32
  • Vector3int16
  • Vector3uint16
  • Vector3
CFrame
Type Description
CFrameQuaternion Rotation stored as a quaternion
CFrameF24 24-bit precision
CFrameF32 32-bit precision
CFrameF64 64-bit precision
CFrameQuantized Quantized for maximum compression
Colors
Type Description
Color3 Standard Color3
Color3F24 24-bit precision
Color3F32 32-bit precision
Color3F64 64-bit precision
UI-related types
Type Description
UDim Standard UDim
UDim2 Standard UDim2
RectFloat24 Rect with 24-bit floats
RectFloat32 Rect with 32-bit floats
Rect Standard Rect
Regions
Type Description
Region3 Standard Region3
Region3Quaternion Quaternion-based
Region3CFrameF24 With 24-bit CFrame precision
Region3CFrameF32 With 32-bit CFrame precision
Region3Quantized Fully quantized
Curves & sequences

Rotation curves

  • RotationCurveKey
  • RotationCurveKeyQuaternion
  • RotationCurveKeyCFrameF24
  • RotationCurveKeyCFrameF32
  • RotationCurveKeyQuantized

Float curves

  • FloatCurveKey
  • FloatCurveKeyF16
  • FloatCurveKeyF24
  • FloatCurveKeyF32

Color sequences

  • ColorSequence
  • ColorSequenceF24
  • ColorSequenceF32
  • ColorSequenceF64

Number ranges

  • NumberRange
  • NumberRangeF16
  • NumberRangeF24
  • NumberRangeF64

Number sequences

  • NumberSequence
  • NumberSequenceF16
  • NumberSequenceF24
  • NumberSequenceF64
Enums
Type Description
Enum Serialized Roblox Enum
Composite & structured types
Type Description
Array Ordered collection of typed values
Struct Structured object composed of named fields
Instance Reference to a Roblox Instance

Schemaless Serialization

One of the most notable additions in Bitstream is schemaless serialization. Unlike schema-based approaches where you must predefine the exact structure of your data, schemaless serialization allows you to serialize and deserialize data without knowing its structure in advance.

This is especially useful for:

  • Systems where the data shape can vary dynamically
  • Debugging tools and inspectors
  • Rapid prototyping without locking down a schema
  • Cases where different clients may send different payload shapes

Schema-based serialization remains available for performance-critical scenarios where every byte matters, but schemaless is now a first-class option in the framework.


Precision Variations

Many complex types in Bitstream come with multiple precision variations (F16, F24, F32, F64, Quantized, Quaternion). This gives you full control over the trade-off between precision and size, allowing you to fine-tune each field of your data based on your actual needs.

For example, transmitting a player position over the network rarely needs full 64-bit precision. Using CFrameF24 or CFrameQuantized can drastically reduce bandwidth usage while keeping the visual result indistinguishable in most gameplay scenarios.


Documentation

Please note that the full documentation is not yet available on the website. I’m actively working on it and it will be published as soon as possible.

In the meantime, you can refer to the previous Buffer module documentation as a base reference, since most of the core concepts remain similar. That said, this should rarely be necessary — the framework itself is largely self-explanatory, with most types, methods, and behaviors documented directly within the code and its inline comments.

Buffer Documentation : Overview - Evxry Utils


Reference

For those who used the previous version, you can find the original Buffer release post here:
Original post

Bitstream is the direct successor and evolution of that module.


Roadmap

This will likely be the last major update for a while due to personal reasons. I’ll continue to work on Bitstream whenever I have the time and mental energy, but I can’t commit to a regular release schedule for now.

The Roblox-ts version is still in progress and will be released once completed.


Part of a Larger Open-Source Project

Bitstream is part of a broader open-source project I’ve been building over time. The project isn’t fully complete yet, and Bitstream is one of its core building blocks.

Other upcoming libraries will directly rely on Bitstream for their binary handling. One example is BitFluent, a buffer-networking library that will use Bitstream internally to handle all buffer serialization and deserialization. This ensures a consistent, unified, and optimized binary layer across all my libraries and frameworks.

More libraries built around Bitstream will be released progressively as the project evolves.


Feedback

Bitstream has been designed to solve real problems and to grow alongside the projects that use it. If you encounter bugs, have feature requests, or want to suggest improvements, feel free to open an issue or reply to this thread. Contributions and constructive feedback are always welcome.

Thanks to everyone who has been supporting the project through Buffer and now Bitstream :folded_hands:

5 Likes

Hi this looks awesome! will this be something to use as a general replacement for normal roblox buffers?

Yeah, that’s actually the goal! I want Bitstream to be usable as a general-purpose replacement for Roblox’s buffers, while providing higher-level serialization/deserialization and support for more types.

Quick addition — I forgot to mention it in the original post: all future updates, upcoming features, and early details before each release are shared on my X and Ko-fi. Follow along if you want to stay up to date with the project’s progress.

X Profile


Ko-fi Profile

For people who clone the repository, an update was launched to fix the missing types in the “./Types” module, please update quickly.

Bitstream v4.0.1 is coming next week with a small patch and a few fixes.

The roblox-ts version is already well underway and should be released shortly after.

Bitstream v4.0.1 has been released.

This update includes a small patch with a few fixes and improvements. Bitstream is also no longer a pre-release and is now officially available as a stable release.

Release Bitstream v4.0.1 · evxryyy/Rbxenv · GitHub

Patch notes :


Version 4.0.1 (08/21/2026) :

  • Fixed a bug where in Debugger the Configuration table was missing the propertie .VerifyVersion
  • Now you have access to all modules for example :
    local Bitstream = require(Somewhere.Bitstream.init)
    
    -- you have access to all of these followings modules
    Bitstream.Bitflag
    Bitstream.Constants
    Bitstream.Debugger
    Bitstream.Enumeration
    Bitstream.Resolver
    Bitstream.Types
    Bitstream.Utilities
    Bitstream.Extensions  
    
  • Added changeMinimumAutoAllocationSize
    • In general, when auto-allocation is triggered, the buffer grows by the size of the type being written. This can become inefficient when writing the same type many times in a short period,
      such as writing a U8 1000 times per second. changeMinimumAutoAllocationSize allows you to define a minimum allocation size.
      If the configured value is larger than the number of bytes required by the type being written, the buffer will allocate that minimum size instead.
      For example, a U8 requires only 1 byte. If changeMinimumAutoAllocationSize is set to a value greater than 1, whenever additional space is needed,
      the buffer will grow by the configured minimum allocation size rather than allocating only 1 byte.
  • Added resetMinimumAutoAllocationSize
    • Simply reset the configured minimum allocation size to 1
  • Added shrink
    • Reduces the buffer size to match the amount of data that has actually been written.
      If the buffer is already fully utilized, no reallocation is performed.

Buffers are cpu heavy for low end systems.

Buffers themselves aren’t really the issue here. Bitstream does add some CPU overhead compared to direct native buffer operations because it performs capacity checks, type handling, and optional auto-allocation. That’s expected since it’s a serialization/binary framework built on top of Roblox’s native buffer API, not just a direct wrapper around buffer.write*.

How does this compare to something like Sera? And do you have benchmarks?

Bitstream and Sera overlap in their core purpose, but Bitstream is more focused on being a general-purpose binary serialization framework rather than just a serializer.

Bitstream provides a larger type system, multiple precision variants (F8/F16/F24/etc…), quantized and quaternion-based types), bit-level types, schemaless serialization, Struct/Array/Instance support, automatic buffer allocation, capacity management, and support for a much wider range of Roblox datatypes.

Sera is more lightweight and schema-oriented, which can be an advantage if you mainly want a simple and predictable serializer with minimal overhead. Bitstream is more focused on flexibility and having the serialization infrastructure itself handle more of the work.

I haven’t benchmarked Bitstream directly against Sera yet, so I don’t want to claim that one is faster without an equivalent benchmark. I also don’t currently have the old Bitstream benchmarks available; I’ll bring the benchmarks back after the Roblox-ts version is released.

The main goal of Bitstream is simply to be an overhaul and replacement for Roblox’s native buffer API, providing a more complete and convenient abstraction while still using native buffers underneath.

Announcement

Hello everyone,

First of all, I apologize for the lack of updates regarding the Bitstream module. It is still being actively developed for the @rbxts version, but I realized that it also needs much more work and adjustments on the Luau side. This is why nothing has been posted or updated on the repository recently.

I am not planning to simply update it and move on. Instead, I plan to completely rework my entire ecosystem. This also means that a new repository will be created to provide the new documentation and the new codebase.

I want to be clear about this: there is currently no official release date. The whole process will take several months, approximately 1 to 3 months at minimum.

Another reason for this is that some older modules that are no longer maintained are still present in the ecosystem. This bothers me, especially since improved versions of these modules are already planned and will eventually replace them.

In other words, older modules such as Buffer, Nexus, and Socket will no longer be accessible after the release of @Rbxenv v2.0.

The name of the project will not change, and neither will its overall purpose. However, the way I organize everything will change drastically, and for good reasons.

I also want to remind everyone that this project is open-source, and anyone is welcome to contribute, provide feedback, report issues, or help improve the ecosystem.

For those currently using the project, you can continue to do so. This announcement is simply meant to let you know that the project has not been abandoned. Everything is currently being reworked, and this process takes time because I am working on it alone.

This project means a lot to me, and I am putting a significant amount of effort into improving it and delivering something that I can be proud of and that will hopefully meet your expectations.

I hope this announcement reassures you that the project is still actively being worked on and that you will continue to support it. Maybe a Discord server will also be created to allow everyone to discuss more freely. I am not sure yet whether it will be necessary, but I will decide when the time comes.