I bet that the recursivity cause the problem. You decode in a different order
than you encode.
Separate your encoded chunks (refs, strings, sons, and the nodes) with
indistinguishable blobs holding only a type info. I.e. 16 bytes of
"REFSREFSREFSREFS..." only to ease debugging and allow asserti
Hi
For a custom project, I'm trying to write a serializer for a trie
datastructure. I was using gob but it is slow due to it's use of
reflect, and I wanted to learn something new.
The struct is mainly composed of nodes:
// Node implements a node of the tree
type Node struct {
// rw is a