apparently mono DeflateStream has no CopyTo method =(

master-beforevarregion
dahlia 2013-12-06 16:24:44 -08:00
parent aba2a44453
commit c0380d1bfe
1 changed files with 5 additions and 1 deletions

View File

@ -566,8 +566,12 @@ namespace OpenSim.Region.Physics.Meshing
{ {
byte[] readBuffer = new byte[2048]; byte[] readBuffer = new byte[2048];
inMs.Read(readBuffer, 0, 2); // skip first 2 bytes in header inMs.Read(readBuffer, 0, 2); // skip first 2 bytes in header
int readLen = 0;
decompressionStream.CopyTo(outMs); while ((readLen = decompressionStream.Read(readBuffer, 0, readBuffer.Length)) > 0)
outMs.Write(readBuffer, 0, readLen);
outMs.Flush();
outMs.Seek(0, SeekOrigin.Begin); outMs.Seek(0, SeekOrigin.Begin);