* Reverting the CSJ2K Array.Copy -> Buffer.BlockCopy optimization for now since I didn't properly update the length parameter the first time around (LIBOMV-861)

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3415 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2010-08-06 03:11:08 +00:00
parent 65deb8f71e
commit 3fb3d19b52
25 changed files with 106 additions and 117 deletions

View File

@@ -183,7 +183,7 @@ namespace CSJ2K.j2k.codestream.writer
// We are at end of 'buf' => extend it
byte[] oldbuf = buf;
buf = new byte[oldbuf.Length + SZ_INCR];
System.Buffer.BlockCopy(oldbuf, 0, buf, 0, oldbuf.Length);
Array.Copy(oldbuf, 0, buf, 0, oldbuf.Length);
}
}
}
@@ -213,7 +213,7 @@ namespace CSJ2K.j2k.codestream.writer
// Not enough place, extend it
byte[] oldbuf = buf;
buf = new byte[oldbuf.Length + SZ_INCR];
System.Buffer.BlockCopy(oldbuf, 0, buf, 0, oldbuf.Length);
Array.Copy(oldbuf, 0, buf, 0, oldbuf.Length);
// SZ_INCR is always 6 or more, so it is enough to hold all the
// new bits plus the ones to come after
}
@@ -297,7 +297,7 @@ namespace CSJ2K.j2k.codestream.writer
{
data = new byte[(avbits == 8)?curbyte:curbyte + 1];
}
System.Buffer.BlockCopy(buf, 0, data, 0, (avbits == 8) ? curbyte : curbyte + 1);
Array.Copy(buf, 0, data, 0, (avbits == 8)?curbyte:curbyte + 1);
return data;
}