Tessil / sparse-map

C++ implementation of a memory efficient hash map and hash set
MIT License
334 stars 36 forks source link

Add support for efficient serialization #6

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 sparse_map deserialize(Deserializer& deserializer, bool hash_compatible = false); to tsl::sparse_(pg)_map/set.

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

Fix feature request #2.