Clean up serialization logic
hcho3 opened this issue · comments
Philip Hyunsu Cho commented
The current logic for serializer is a mess, with feeble attempt at abstraction. In particular, it's unclear what SerializeTemplate
and DeserializeTemplate
do, and why two copies of them exist in the header include/tree/tree.h
.
We need a better abstraction for implementing common logic for PyBuffer and FILE serializers.
Also: we should use std::ostream
/ std::istream
instead of FILE*
. This way, we can seamlessly support serialization to in-memory strings.