Releases: marcizhu/Cereal
Cereal v1.2.1
Cereal 1.2.1 Release
This is the fourth release for Cereal! This update is focused on fixing several bugs that affected the cross-compatibility, usability and stability of the library.
IMPORTANT: This update fixes several bugs. We strongly encourage updating to this version as soon as possible.
Changelog
- Fixed template specialization on Linux (Thanks, @raresica1234!)
- Fixed minor bug in Buffer.h
- Fixed CRC32 calculation error. Now the CRC checksum is compatible with the C# port of the library
- Fixed
int64
anddouble
deserialization bug in Buffer.h - Added randomization to tests
- Added CircleCI for continuous integration & automatic unit testing
- Replaced sandbox program with individual tests for each section of the library
- Added Google Test for unit testing purposes
- Fixed 'tautological compare' warning. Now the library will check for overflows properly
- Fixed vector data reallocation in Array::getArray()
- Changed
std::string
withconst std::string&
when possible to avoid unnecessary string copying - Added functions to copy arbitrary data from buffers
- Deleted copy constructors for all classes to prevent double memory deletion bugs
- Added functions to delete Fields and Arrays from Objects, Objects from Databases, and Databases from Headers
Notes about backwards compatibility
The API itself is fully backwards compatible, but because there was a bug with the CRC32 calculation algorithm, all databases created with Cereal v1.2.0 would trigger a Checksum mismatch
exception when loading with the new CRC32 algorithm.
To solve this, we introduced Databases v2.1. They are identical to Databases v2.0, but use the new algorithm. Cereal will load existing databases with version 2.0, but they'll be automatically updated to version 2.1. Also, it is NOT possible to manually create databases with version 2.0, as the version will silently bump up to v2.1.
What does this mean for all of you using this library? Nothing! If you have existing databases with version 2.0, Cereal will read them, check the checksum using the old algorithm, and update them to version 2.1 should you re-serialize the existing database. If a new database is created, v2.1 will be selected by default unless otherwise specified. Therefore, backwards-compatibility is 100% maintained.
Cereal v1.2.0
Cereal 1.2.0 Release
This is the third release for Cereal! For this update we have some big changes and a bunch of bug fixes.
IMPORTANT: This update fixes several bugs, as well as adding new features and better performance. We recommend updating to this version as soon as possible.
NOTE: This update is fully backwards-compatible.
Changelog
- Created C# port (available here)
- Fixed reading and writing for floats and doubles on Buffer.h (commit 27f0d5f)
- Fixed maximum array item count (commit 56aa34b)
- Fixed maximum database size (commit 56aa34b)
- Fixed compilation warnings (commits 4047b1a and fa36bf4)
- Fixed minor bugs on class Buffer (commit 4047b1a)
- Replaced most
assert
with standard C++ exceptions (commit e774195) - Removed Windows-only functions (commit 8c221ef)
- Added unit testing framework (several commits)
- Added more than 4.000 tests to Sandbox (several commits)
- Added databases version 2.0. More details on that later. (commit 8610467)
- Added GCC (and Linux) support (commit c3a8875)
- Added x64 support (commit fabffb4)
- Improved array writing speed (commit edd9dab)
- Improved string array reading speed (commit c5557a2)
- Improved database writing speed (commit 2198fe5)
Databases v2.0 are here!!
This new version for databases has the same features of the v1.0, but adds a big feature: checksums.
Checksums are just a number that can be used for error detection. Each set of bytes will generate a unique checksum. Therefore, if the checksum has changed, we know the data has been corrupted or intentionally changed.
This feature could be useful for long-term data storage or network data transmission, where data can be changed using a man-in-the-middle attack.
The checksum only uses 4 extra bytes per database, so we recommend using it, as we should have added this feature to the first Cereal release.
Cereal v1.1.0
Cereal 1.1.0 Release
This is the second release of Cereal, which just adds a minor feature.
This update is backwards compatible: it has all the features of the previous release, but it adds some new things too. Files created with version 1.0.0 can be read using version 1.1.0, but files created with version 1.1.0 which use the new features cannot be read using Cereal version 1.0.0. If you don't use those new features, both versions are fully compatible.
Features
- Added
std::string
arrays: Now arrays can store multiple strings. Keep in mind that the absolute maximum serialized database size is 2^32 bytes (around 4 Gb). Try to keep this arrays under that maximum, keeping in mind that each string needs2 + character count
bytes, or else it may cause a few issues.
Cereal v1.0.0
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
anddouble
- 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.