问题描述
- c# System.IO 关于write方法问题
-
本人使用ZOutputStream 解压数据public byte[] deCompression(byte[] bytes)
{
MemoryStream outStream = new MemoryStream();
ZOutputStream zOutputStream = new ZOutputStream(outStream);zOutputStream.Write(bytes, 0, bytes.Length);
zOutputStream.Close();
outStream.Close();
return outStream.ToArray();
}
调用zOutputStream.Write(bytes, 0, bytes.Length);时出错,如果改为zOutputStream.Write(bytes, 0, bytes.Length-1);就变得正常,但是这样就少写入一个byte好奇怪啊,求高人指点。
write(byte[] bytes, int off, int len)
时间: 2024-12-07 22:09:35