Skip to content

Cereal v1.0.0

Compare
Choose a tag to compare
@marcizhu marcizhu released this 23 Oct 10:41
· 78 commits to master since this release

Welcome to Cereal 1.0.0!

This is the first official release for Cereal! Cereal is a serialization library based on The Cherno's Java Serialization library. This library has been done by @marcizhu and @raresica1234. The library is really simple and fully customizable to fit all your needs!

Features:

Cereal is a serialization library, which means it is designed to store large amounts of data types in memory or in a file, and then you can read that chunk of memory/file and get the data back, so it's really useful for a game, game engine, network engine or anything that needs to send or save large amounts of data at once.

To store data you have the following classes:

  • Fields: A field can store just a simple data type. It's the basic serialization unit.
  • Array: An array also has a name, but it can store up to 4.294.967.296 items in it (theoretically, in reality the maximum is 1.073.741.824 items because of x86 architecture). The data types it can store are: bool, char, byte, short, int, long long, float and double
  • Object: An object is a bit more advanced. It has a name, and can store up to 65536 fields plus 65536 arrays.
  • Database: A database is a collection of objects. It can store up to 65536 objects, but keep in mind that the maximum size of a database is 4 gigabytes, and here's why.
  • Header: Headers are completely optional. Headers allow to store up to 255 databases in a single file or memory block, so if you need more than a single database, this is definitely a solution to that.
  • Buffer: Buffers don't store data. Instead, they can be used as a temporary storage while serializing or deserializing data. Also they are able of reading or writing to files.