Tessil / hat-trie

C++ implementation of a fast and memory efficient HAT-trie
MIT License
792 stars 114 forks source link

Add support for efficient serialization #19

Closed Tessil closed 5 years ago

Tessil commented 5 years ago

This PR adds two new methods template<class Serializer> void serialize(Serializer& serializer) const; and template<class Deserializer> static array_map deserialize(Deserializer& deserializer, bool hash_compatible = false); to tsl::htrie_map/set.

They take advantage of the internals of the data structure to provide an efficient way to serialize/deserialize the structure.