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

◆ Write() [1/2]

override void System.IO.Compression.DeflateStream.CopyToStream.Write ( byte[] buffer,
int offset,
int count )
inline

Definition at line 149 of file DeflateStream.cs.

150 {
152 if (count <= 0)
153 {
154 return;
155 }
156 if (count > buffer.Length - offset)
157 {
158 throw new InvalidDataException(System.SR.GenericInvalidData);
159 }
162 {
163 int num = _deflateStream._inflater.Inflate(new Span<byte>(_arrayPoolBuffer));
164 if (num > 0)
165 {
167 }
169 {
170 break;
171 }
172 }
173 }
void SetInput(byte[] inputBuffer, int startIndex, int count)
Definition Inflater.cs:154
unsafe bool Inflate(out byte b)
Definition Inflater.cs:41
void Write(byte[] buffer, int offset, int count)
static string GenericInvalidData
Definition SR.cs:20
Definition SR.cs:7

References System.IO.Compression.DeflateStream.CopyToStream._arrayPoolBuffer, System.IO.Compression.DeflateStream.CopyToStream._deflateStream, System.IO.Compression.DeflateStream.CopyToStream._destination, System.IO.Compression.DeflateStream._inflater, System.buffer, System.count, System.IO.Compression.DeflateStream.EnsureNotDisposed(), System.IO.Compression.Inflater.Finished(), System.SR.GenericInvalidData, System.IO.Compression.Inflater.Inflate(), System.IO.Compression.Inflater.NeedsInput(), System.offset, System.IO.Compression.Inflater.SetInput(), and System.IO.Stream.Write().