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

◆ UnsafeDeflate()

unsafe void System.Net.WebSockets.Compression.WebSocketDeflater.UnsafeDeflate ( ReadOnlySpan< byte > input,
Span< byte > output,
out int consumed,
out int written,
out bool needsMoreBuffer )
inlineprivate

Definition at line 97 of file WebSocketDeflater.cs.

98 {
99 fixed (byte* ptr = input)
100 {
101 fixed (byte* ptr2 = output)
102 {
103 _stream.NextIn = (IntPtr)ptr;
104 _stream.AvailIn = (uint)input.Length;
105 _stream.NextOut = (IntPtr)ptr2;
106 _stream.AvailOut = (uint)output.Length;
108 consumed = input.Length - (int)_stream.AvailIn;
109 written = output.Length - (int)_stream.AvailOut;
110 needsMoreBuffer = errorCode == ZLibNative.ErrorCode.BufError || _stream.AvailIn != 0;
111 }
112 }
113 }
int Length
Definition Span.cs:70

References System.Net.WebSockets.Compression.WebSocketDeflater._stream, System.Net.Deflate, System.input, and System.Span< T >.Length.

Referenced by System.Net.WebSockets.Compression.WebSocketDeflater.DeflatePrivate().