go-restruct / restruct

Rich binary (de)serialization library for Golang

Home Page:https://restruct.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement streaming with io.Reader and io.Writer

jchv opened this issue · comments

commented

It seems like it would be useful to implement streaming. Normally, I'd wager that it would be necessary to split the codebase to make it as optimal as possible in each case. However, with the way things actually work right now, it would probably suffice to do something a bit like the encoding/json package does, except possibly size-aware to prevent reading too much.

If there are performance deficits taken in order to support streaming without splitting the code, we should probably try to win those back by implementing separate paths in the codegen when that is actually implemented.