All Projects → rikimaru0345 → Ceras

rikimaru0345 / Ceras

Licence: other
Universal binary serializer for a wide variety of scenarios https://discord.gg/FGaCX4c

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Ceras

Binaryserializer
A declarative serialization framework for controlling formatting of data at the byte and bit level using field bindings, converters, and code.
Stars: ✭ 197 (-47.33%)
Mutual labels:  serializer, serialization, binary, protocol
Ruffles
Lightweight and fully managed reliable UDP library.
Stars: ✭ 131 (-64.97%)
Mutual labels:  network, networking, protocol, net
Bois
Salar.Bois is a compact, fast and powerful binary serializer for .NET Framework. With Bois you can serialize your existing objects with almost no change.
Stars: ✭ 53 (-85.83%)
Mutual labels:  serialization, formatter, binary, serializer
Txeh
Go library and CLI utilty for /etc/hosts management.
Stars: ✭ 181 (-51.6%)
Mutual labels:  binary, network, networking
Golden Gate
Framework to connect wearables and other IoT devices to mobile phones, tablets and PCs with an IP-based protocol stack over Bluetooth Low Energy
Stars: ✭ 223 (-40.37%)
Mutual labels:  network, networking, protocol
Fastbinaryencoding
Fast Binary Encoding is ultra fast and universal serialization solution for C++, C#, Go, Java, JavaScript, Kotlin, Python, Ruby, Swift
Stars: ✭ 421 (+12.57%)
Mutual labels:  serialization, binary, protocol
Hyperion
Polymorphic serialization for .NET
Stars: ✭ 225 (-39.84%)
Mutual labels:  serializer, serialization, dotnet-core
Swiftmsgpack
💬 Fast & Lightweight MsgPack Serializer & Deserializer for Swift
Stars: ✭ 128 (-65.78%)
Mutual labels:  serializer, msgpack, serialization
Messagepack Csharp
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
Stars: ✭ 3,668 (+880.75%)
Mutual labels:  serializer, msgpack, serialization
Apex.Serialization
High performance contract-less binary serializer for .NET
Stars: ✭ 82 (-78.07%)
Mutual labels:  serialization, binary, serializer
GenericProtocol
⚡️ A fast TCP event based buffered server/client protocol for transferring data over the (inter)net in .NET 🌐
Stars: ✭ 38 (-89.84%)
Mutual labels:  serialization, binary, protocol
sirdez
Glorious Binary Serialization and Deserialization for TypeScript.
Stars: ✭ 20 (-94.65%)
Mutual labels:  serialization, binary, protocol
JsonFormatter
Easy, Fast and Lightweight Json Formatter. (Serializer and Deserializer)
Stars: ✭ 26 (-93.05%)
Mutual labels:  serialization, formatter, serializer
Exscript
A Python module making Telnet and SSH easy
Stars: ✭ 337 (-9.89%)
Mutual labels:  network, networking, protocol
Panko serializer
High Performance JSON Serialization for ActiveRecord & Ruby Objects
Stars: ✭ 266 (-28.88%)
Mutual labels:  serializer, serialization
Permazen
Language-Natural Persistence Layer for Java
Stars: ✭ 265 (-29.14%)
Mutual labels:  serialization, database
Polymorph
Polymorph is a real-time network packet manipulation framework with support for almost all existing protocols
Stars: ✭ 364 (-2.67%)
Mutual labels:  network, protocol
Cs Wiki
🎉 致力打造完善的 Java 后端知识体系,不仅仅帮助各位小伙伴快速且系统的准备面试,更指引学习的方向
Stars: ✭ 369 (-1.34%)
Mutual labels:  database, network
Inquiry Deprecated
[DEPRECATED]: Prefer Room by Google, or SQLDelight by Square.
Stars: ✭ 264 (-29.41%)
Mutual labels:  serialization, database
Nora
Nora is a Firebase abstraction layer for FirebaseDatabase and FirebaseStorage
Stars: ✭ 270 (-27.81%)
Mutual labels:  database, networking

Ceras

AppVeyor Test Results Discord NuGet Release

Ceras is a binary serializer. It converts any object into a byte[] and back. It goes above and beyond in terms of features, speed, and comfort. Supports reference loops, large/complicated inheritance chains, splitting objects into parts, ...

Quick start

class Person { public string Name; public int Age; }
var p = new Person { Name = "riki", Age = 5 };

var ceras = new CerasSerializer();

var bytes = ceras.Serialize(p);
  1. >> Many more examples in the code tutorial
  2. >> Detailed guides for specific scenarios on my blog
  3. >> Read 'Optimization & Usage Pitfalls'

Features

Performance benchmarks

Ceras generally ranks at the top end of the performance spectrum, together with NetSerializer and MessagePack-CSharp. To get an idea of how Ceras performs here are the preliminary benchmark results. The resulting binary size is about the same as MessagePack-CSharp.

Single object performance benchmark

The shown results are obtained from this code and I encourage you to not only try it yourself, but to also provide feedback about scenarios you had good and bad results with.

Don't forget to tune the settings in SerializerConfig for your specific situation. Using Ceras to read/write network packets might require different settings than, lets say, saving a settings-object to a file, or persisting items/spells/monsters in a game, or ...

The project is still heavily work-in-progress, meaning that over time more optimizations will get implemented (your feedback is important here!).

What can this be used for?

Example usages

The primary goal is to make an universal serializer that can be used in every situation. Personally my primary intentions were easy object persistance and network communication. I've added many features over time and whenever someone can think of a good scenario that should be supported as well I'll make it happen.

Examples:

  • Settings: Saving objects to disk quickly without much trouble: settings, savegames, whatever it is. With pretty much zero config. See steps 1 and 2 in the Usage Guide

  • Splitting: So your Person has references to other Person objects, but each one should be serialized individually!? (without the references quickly dragging in essentially your whole program). Maybe you want to be able to put each Person into its own file, or send them over the network one-by-one as needed? No problem! Using IExternalRootObject it's not an issue! See External Objects Guide (Game DB example)).

  • Network: Because of its simple API and vast set of features Ceras is uniquely suited to implement a full 'network-protocol' for you. I wrote a short guide that shows off how a basic TCP implementation could look like: Just Send(myObject); it, then var obj = await Receive(); on the other side, that's it! It literally can't get any easier than that. At the moment the guide only has 2 parts, but when I have some (and if there are requests for it) I'd like to continue the series, eventually building that sample into a full-fledged, robust, and battle-tested networking system.

  • More: The above are just examples, Ceras is made so it can be used in pretty much every situation...

When should I not use this?

  • If you need human readable output for some reason. For example some file that you want to be able to edit in a text-editor. For those usages JSON or XML are likely better suited.

  • You plan to use this on a platform that does not support code generation. Serializers for user-types are created at runtime through code-generation. And if that isn't allowed (for example on iOS) Ceras won't be able to generate arbitrary object-formatters. Built-in types will still work though. There are ways to fix this though... (pre-generating the formatters) Ceras now has a dedicated AotMode in the config and a code-generator (quick guide for it here) for IL2CPP/Unity/AoT.

Support

>> FAQ

>> Development Blog

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].