MCPcopy Create free account
hub / github.com/ParaN3xus/udon-decompiler / ReadExactly

Method ReadExactly

tools/UdonProgramDumper/BundleDecryption.cs:381–397  ·  view source on GitHub ↗
(Stream stream, int count)

Source from the content-addressed store, hash-verified

379 }
380
381 private static byte[] ReadExactly(Stream stream, int count)
382 {
383 var bytes = new byte[count];
384 var offset = 0;
385 while (offset < count)
386 {
387 var read = stream.Read(bytes, offset, count - offset);
388 if (read == 0)
389 {
390 throw new EndOfStreamException("Unexpected end of stream.");
391 }
392
393 offset += read;
394 }
395
396 return bytes;
397 }
398
399 private static ushort ReadUInt16BigEndian(Stream stream)
400 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected