Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

嵌套对象支持 #9

Closed
keepinmind9 opened this issue Dec 3, 2014 · 1 comment
Closed

嵌套对象支持 #9

keepinmind9 opened this issue Dec 3, 2014 · 1 comment

Comments

@keepinmind9
Copy link

嵌套对象的支持是不是弄得太复杂了?
为了支持这个 codec 上多出了3方法
int size(T t)
void writeTo(T t, CodedOutputStream out)
T readFrom(CodedInputStream intput)

直接把对象 encode 然后直接按照 byte[] 处理效果应该是一样的吧?

@jhunters
Copy link
Owner

jhunters commented Dec 3, 2014

增加这三个方法并非是为了支持嵌套对象, 然后部分场景会需要单独使用该方法,如单独计算对象长度等

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants