关闭

缓冲区buffer,字节数组 bytep[] arraysample与内存流memory stream

标签: bufferstreambytearraysc#file
1902人阅读 评论(0) 收藏 举报
分类:

 1 buffer缓冲区

The word Buffer itself says that it works on direct Memory. In .NET, it is basically a manipulation of unmanaged memory represented as arrays of bytes.

要点1: 缓冲区是内存的一部分

要点2: 在程序中可以表示为字节数组。

 

2字节数组 byte[ ]  arraySample

You are dealing with binary data that is organized into a series of bytes in your C# program, which may be part of a data file, image file, compressed file, downloaded server response, or many other files. The C# language provides a byte array type that is an ideal representation of this data in terms of its accurate representation in memory. Here we examine the byte array type in the C# language.

要点1: 低层的数据是二进制数据,如0101001。

要点2: byte[]字节数组可以让程序直接来操作二进制数据。

要点3: 这些二进制数据可以表示很多东西,如数据文件,图像文件,压缩文件等。

 

3 memory stream

The MemoryStream class creates streams that have memory as a backing store instead of a disk or a network connection. MemoryStream encapsulates data stored as an unsigned byte array that is initialized upon creation of a MemoryStream object, or the array can be created as empty.

要点1: 这些数据流是在内存中储存的数据流。

要点2: 用字节数组byte[]来表示

 

(参考资料

http://dotnetperls.com/byte-array

MSDN)

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:1213613次
    • 积分:13482
    • 等级:
    • 排名:第992名
    • 原创:408篇
    • 转载:14篇
    • 译文:0篇
    • 评论:139条
    博客专栏
    最新评论