缓冲区应对问题. [英] Buffer coping question .
本文介绍了缓冲区应对问题.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
将数据从一个大字节数组复制到另一字节的最有效方法是什么?
Whats the most efficient way to copy data from one large byte array to another?
推荐答案
它是System.Array.CopyTo
,另请参见System.Array.Clone
精确的克隆.
-SA
It''sSystem.Array.CopyTo
, see alsoSystem.Array.Clone
for exact clone.
—SA
除了SA的解决方案之外,总是有Buffer.BlockCopy [ ^ ]-不确定它是否更有效率,但 ^ ]表示可能是这样.
In addition to SA''s solution, there is always Buffer.BlockCopy[^] - not sure if it''s any more efficient but this SO thread[^] indicates it may be.
这篇关于缓冲区应对问题.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文