47 public void Prepare(
long payloadLength,
int userBufferLength)
60 public void AddBytes(
int totalBytesReceived,
bool endOfMessage)
117 return Finish(output, ref written);
125 if (remainingByte.HasValue)
127 if (output.
Length == written)
135 if (output.
Length > written)
171 remainingByte =
null;
174 remainingByte =
value;
183 stream.NextOut = (
IntPtr)ptr;
185 errorCode =
stream.Inflate(flushCode);
188 return destination.Length - (int)
stream.AvailOut;
214 return zLibStreamHandle;
static ArrayPool< T > Shared
static ErrorCode CreateZLibStreamForInflate(out ZLibStreamHandle zLibStreamHandle, int windowBits)
static byte Min(byte val1, byte val2)
void AddBytes(int totalBytesReceived, bool endOfMessage)
static unsafe int Inflate(ZLibNative.ZLibStreamHandle stream, Span< byte > destination, ZLibNative.FlushCode flushCode)
unsafe bool Inflate(Span< byte > output, out int written)
ZLibNative.ZLibStreamHandle CreateInflater()
ZLibNative.ZLibStreamHandle _stream
void Prepare(long payloadLength, int userBufferLength)
bool Finish(Span< byte > output, ref int written)
WebSocketInflater(int windowBits, bool persisted)
static ReadOnlySpan< byte > FlushMarker
static unsafe bool IsFinished(ZLibNative.ZLibStreamHandle stream, out byte? remainingByte)
static string ZLibErrorNotEnoughMemory
static string ZLibUnsupportedCompression
static string ZLibErrorDLLLoadError
static string ZLibErrorInconsistentStream
static string ZLibErrorUnexpected