amazon-ion / ion-go

A Go implementation of Amazon Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
174 stars 31 forks source link

Add Reset function to binaryReader #196

Closed jt0 closed 5 months ago

jt0 commented 5 months ago

Reset improves reader performance when the same binary data is processed multiple times. It works by reusing the symbol table constructed during the first read, and jumping straight to the first "content" byte when Reset is called.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

popematt commented 5 months ago

@nirosys, Can you take a look at this PR?