C implem
dump is pretty much useless...
C impl