inkeliz / karmem

Karmem is a fast binary serialization format, faster than Google Flatbuffers and optimized for TinyGo and WASM.
BSD 3-Clause "New" or "Revised" License
654 stars 27 forks source link

Option to use small dynamic array header #71

Closed inkeliz closed 2 years ago

inkeliz commented 2 years ago

Currently, the dynamic array header takes 16 bytes, including padding. It can be reduce to 8 bytes, by removing the size_each in the header.

That field is not used, since non-inline structs and contents can't be used in dynamic array. That change is not backward-compatible, but we can make it optional.

That change can be combined with #65, which will make the serialized content smaller.