前言,需要对一个下载下来的stream进行多次读操作。这个时候是无法确定stream的长度,无法进行seek复位操作,所以需要转化为byte数组
private byte[] StructureBytes(Stream stream)
{
int bufferSize = 10240;
long writtenBytes = 0L;
var byteArrs = new List<byte[]>();
while (true)
{
byte[] buffer = new BinaryReader(stream).ReadBytes