Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadBytes()

static void System.IO.Compression.ZipHelper.ReadBytes ( Stream stream,
byte[] buffer,
int bytesToRead )
inlinestaticpackage

Definition at line 19 of file ZipHelper.cs.

20 {
21 int num = bytesToRead;
22 int num2 = 0;
23 while (num > 0)
24 {
25 int num3 = stream.Read(buffer, num2, num);
26 if (num3 == 0)
27 {
28 throw new IOException(System.SR.UnexpectedEndOfStream);
29 }
30 num2 += num3;
31 num -= num3;
32 }
33 }
static string UnexpectedEndOfStream
Definition SR.cs:120
Definition SR.cs:7

References System.buffer, System.stream, and System.SR.UnexpectedEndOfStream.

Referenced by System.IO.Compression.ZipArchiveEntry.LoadLocalHeaderExtraFieldAndCompressedBytesIfNeeded(), and System.IO.Compression.ZipHelper.SeekBackwardsAndRead().