A fast LuaJIT-based serializer for Lua values, producing compact output and supporting class registration.
bitser is a Lua serialization library that converts Lua values into compact strings and restores them back, optimized for use with LuaJIT. It solves the need for fast and efficient data serialization in Lua applications, particularly for scenarios like saving game states, transmitting data over networks, or caching. The library emphasizes speed and small output sizes while ensuring safety with untrusted serialized data.
Lua developers, especially those using LuaJIT, who need high-performance serialization for applications like game development, data storage, or networked systems.
Developers choose bitser for its exceptional speed and minimal output size, leveraging LuaJIT's capabilities. Its support for registering classes from various Lua class libraries and safety with untrusted data make it a robust alternative to other serialization tools.
Serializes and deserializes Lua values with LuaJIT
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages LuaJIT's JIT compilation and FFI library for high-speed data conversion, making it ideal for performance-critical applications like game state saving.
Produces compact serialized strings that reduce storage and bandwidth usage, as emphasized in benchmark comparisons with other libraries.
Designed to handle serialized input from unknown sources safely, preventing security vulnerabilities in network or caching scenarios.
Registers classes from popular Lua OOP libraries like MiddleClass and hump.class, easing integration with existing object-oriented codebases.
Offers straightforward dumps and loads functions for serialization and deserialization, simplifying developer workflow.
Not safe for cross-endian data sharing; requires manual checks on ffi.abi 'le' for compatibility, limiting use in heterogeneous hardware environments.
Heavily relies on LuaJIT for performance; on platforms like Android and iOS where JIT is disabled, it runs much slower, as noted in the README.
Benchmarking requires downloading multiple external files and using the LÖVE framework, adding complexity for performance testing and comparison.