MemoryStream youms = new MemoryStream();
byte[] buffer = new byte[256];
int count = ms.Read(buffer, 0, buffer.Length);
while (count>0)
{
//处理你的buffer 吧
count = ms.Read(buffer, 0, buffer.Length);
}