Closed utterances-bot closed 9 months ago
I wrote https://gitlab.com/robigalia/ssmarshal for a usecase that was OK spending some time shuffling bytes around to rearrange due to padding or etc, but absolutely did not want to spend any additional bytes compared to the heap representation.
You may be interested / horrified by rkyv
and its rel_ptr
crate, it provides a robust solution to not wanting to pay costs deserializing. Instead you pay once when writing, and have a slightly different representation (derived via Archive
) for types stored on disk. Some cool experiments there.
Adventures in Binary Serialisation :: KataShift
UB? Never!
https://blog.maguire.tech/posts/explorations/binary-serialisation/