mirror of
https://github.com/fraillt/bitsery.git
synced 2026-06-08 00:03:54 +00:00
To get the most out of Bitsery, start with the tutorial. Once you're familiar with the library consider the following reference material.
Library design:
fundamental typesvalueNb instead of valueflexible syntaxserializer/deserializer functions overloadsextending library functionalityerrors handlingforward/backward compatibility via Growable extension
Core Serializer/Deserializer functions (alphabetical order):
alignboolValuecontainerextcontextobjecttextvalue
Serializer/Deserializer extensions via ext method (alphabetical order):
EntropyGrowableStdMapStdOptionalStdQueueStdSetStdStackValueRange
AdapterWriter/Reader functions:
writeBits/readBitswriteBytes/readByteswriteBuffer/readBufferalignbeginSession/endSessionflush (writer only)writtenBytesCount (writer only)setError (reader only)getError (reader only)isCompletedSuccessfully (reader only)
Input adapters (buffer and stream) functions:
readerrorsetErrorisCompletedSuccessfully
Output adapters (buffer and stream) functions:
writeflushwrittenBytesCount
Tips and tricks:
- if you're getting static assert "please define 'serialize' function", most likely it is because your serialize function is not defined in same namespace as object.
Limitations:
- max text or container size can be 2^(n-2) (where n = sizeof(std::size_t) * 8) for 32-bit systems it is 1073741823 (0x3FFFFFF).
Other: