英文:
Example of using Gob in stream processing
问题
Gob在处理内部重复数据结构(如大型结构体切片或流式数据)时,在空间和性能效率方面表现良好,这一点已经有文档记录。然而,在搜索后,我没有找到直接的示例。
有人可以提供或链接一个如何在(可能是无限的)流式输入中使用Gob的示例吗?比如一个从队列中读取的工作器。
英文:
Gob is good in space and performance efficiency when processing internally repeating data structure like big slice of struct or streamed data as documented. However I can't find a direct example after some searching.
Can anyone give or link to an example of how to use in a (possibly infinite) streamed input? (like a worker reading from a queue)
答案1
得分: 1
处理流基本上就是处理io.Writer/io.Reader。我在Go Playground上分享了一段代码片段。希望对你有帮助。这是链接。
英文:
Dealing with stream is basically dealing with io.Writer/io.Reader. I share a snippet on go playground. Hope that helps. http://play.golang.org/p/_pzLtX-zc2
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论