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 asserting the chunk type.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to