{"id":"enzzyfrenzzy/sera","name":"sera","scope":"enzzyfrenzzy","platform":"roblox","description":"A package port of Loleris's Sera module, used by both the server & client. check README.md for more info. Last updated on 2025-10-20.","version":"0.0.2","latest":"0.0.2","versions":["0.0.1","0.0.2"],"license":"Apache-2.0","licenseRating":"safe","licenseCaveats":["Modified files must carry a notice of changes. If the package ships a NOTICE file, its attributions must be preserved.","License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{},"integrity":"2f4ee2898a859ce868700db86e68ed39e6eac9c8e20e81613c09c36db946421b","likes":0,"downloads":0,"install":"forest install enzzyfrenzzy/sera","url":"https://forest.dev/p/roblox/enzzyfrenzzy/sera","files":"https://api.forest.dev/ai/package/roblox/enzzyfrenzzy/sera/files","readme":"# Sera\r\nThis is a Low-level schematized serialization library for Roblox for handling limited size dictionaries with primitive types. This library aims to do as few operations (table lookups, comparisons, etc.) as possible to achieve it's result while staying a good-enough serialization library.\r\n\r\nSera's intended purpose is to help with serialization schemas when handling high-efficiency game entity replication to clients. Note that this is not a module for beginners and you should at least know the basics of using the [`buffer`](https://create.roblox.com/docs/reference/engine/libraries/buffer) class.\r\n\r\n## Perks:\r\n- Fast.\r\n- Efficient-enough representation of a dictionary inside a `buffer`.\r\n- `Sera.Serialize`, `Sera.Push`, `Sera.DeltaSerialize` and `Sera.DeltaPush` outputs can be combined inside a large buffer - `Sera.Deserialize` and `Sera.DeltaDeserialize` understand when an entry ends given a buffer and offset and returns a new offset for the developer to continue reading the buffer.\r\n- `Sera.DeltaSerialize` and `Sera.DeltaPush` treats a schema as an enumerator and serializes an incomplete dictionary with added (n + 1) bytes in the output where \"n\" is the number of fields present.\r\n\r\n## Limitations:\r\n- Schemas can only hold up to 255 fields in Sera and it's going to stay that way - you may fork the project and easily change this for yourself.\r\n- `Sera.Serialize` and `Sera.DeltaSerialize` will fail if resulting buffer size is larger than  the constant `BIG_BUFFER_SIZE` inside the `Sera` module - This value should be moderate, but within reason since that's the memory `Sera` will take and never release during runtime.\r\n\r\n[Source Code (Single ModuleScript)](https://github.com/MadStudioRoblox/Sera/blob/main/Sera.luau)\r\n\r\n[Longer Example Code](https://github.com/MadStudioRoblox/Sera/blob/main/Test.luau)\r\n\r\n[Join the discussion in the Roblox Developer Forum (click here)](https://devforum.roblox.com/t/sera-low-level-schematized-serialization-library/3304206)\r\n\r\n***This is an experimental project - there will be no guarantees for backwards-compatibility on further updates***\r\n\r\n## Short Example:\r\n\r\n```lua\r\n\r\nlocal Sera = require(game.ReplicatedStorage.Sera)\r\n\r\nlocal Schema = Sera.Schema({\r\n\tHealth = Sera.Int16,\r\n\tPosition = Sera.Vector3,\r\n\tName = Sera.String8,\r\n})\r\n\r\nlocal serialized, error_message = Sera.Serialize(Schema, {\r\n    Health = 150,\r\n    Position = Vector3.new(1001, 69, 0.1),\r\n    Name = \"loleris\",\r\n})\r\n\r\nif error_message ~= nil then\r\n    error(error_message)\r\nend\r\n\r\nlocal deserialized = Sera.Deserialize(Schema, serialized :: buffer)\r\n\r\nprint(`Serialized buffer size: {buffer.len(serialized :: buffer)} bytes`)\r\nprint(`Deserialized:`, deserialized)\r\n\r\n```\r\n\r\n# EnzzyFrenzzy\r\n\r\nA package port of Loleris's Sera module, used by both the server & client. The purpose of this is to be used as a package on Wally.\r\nYou can find the package here: https://wally.run/package/enzzyfrenzzy/sera?version=0.0.1 OR search 'enzzyfrenzzy'\r\n\r\nHere are the original websites:\r\nDevforum - https://devforum.roblox.com/t/sera-low-level-schematized-serialization-library/3304206\r\nGithub - https://github.com/MadStudioRoblox/Sera/blob/main/Sera.luau\r\nExample (Longer) - https://github.com/MadStudioRoblox/Sera/blob/main/Test.luau\r\nBuffers - https://create.roblox.com/docs/reference/engine/libraries/buffer\r\nAPI - CHECK THE Sera.luau FILE FOR THE API, AND HOW IT WORKS.","readmeTruncated":false}