private static ErrorCode Deflate(ZLibStreamHandle stream, FlushCode flushCode) { ErrorCode errorCode = stream.Deflate(flushCode); if (errorCode is ErrorCode.Ok or ErrorCode.StreamEnd or ErrorCode.BufError) { return(errorCode); } string message = errorCode == ErrorCode.StreamError ? SR.ZLibErrorInconsistentStream : string.Format(SR.ZLibErrorUnexpected, (int)errorCode); throw new WebSocketException(message); }
public static ErrorCode CreateZLibStreamForInflate(out ZLibStreamHandle zLibStreamHandle, int windowBits) { zLibStreamHandle = new ZLibStreamHandle(); return(zLibStreamHandle.InflateInit2_(windowBits)); }
public static ErrorCode CreateZLibStreamForDeflate(out ZLibStreamHandle zLibStreamHandle, CompressionLevel level, int windowBits, int memLevel, CompressionStrategy strategy) { zLibStreamHandle = new ZLibStreamHandle(); return(zLibStreamHandle.DeflateInit2_(level, windowBits, memLevel, strategy)); }
public static Int32 ZLibCompileFlags() { return(ZLibStreamHandle.ZLibCompileFlags()); }
public static ErrorCode CreateZLibStreamForInflate(out ZLibStreamHandle zLibStreamHandle) { return(CreateZLibStreamForInflate(out zLibStreamHandle, Deflate_DefaultWindowBits)); }
public static ErrorCode CreateZLibStreamForDeflate(out ZLibStreamHandle zLibStreamHandle) { return(CreateZLibStreamForDeflate(out zLibStreamHandle, CompressionLevel.DefaultCompression, Deflate_DefaultWindowBits, Deflate_DefaultMemLevel, CompressionStrategy.DefaultStrategy)); }
public static ErrorCode CreateZLibStreamForInflate(out ZLibStreamHandle zLibStreamHandle, int windowBits) { zLibStreamHandle = new ZLibStreamHandle(); return zLibStreamHandle.InflateInit2_(windowBits); }
public static ErrorCode CreateZLibStreamForDeflate(out ZLibStreamHandle zLibStreamHandle, CompressionLevel level, int windowBits, int memLevel, CompressionStrategy strategy) { zLibStreamHandle = new ZLibStreamHandle(); return zLibStreamHandle.DeflateInit2_(level, windowBits, memLevel, strategy); }
public static ErrorCode CreateZLibStreamForInflate(out ZLibStreamHandle zLibStreamHandle) { return CreateZLibStreamForInflate(out zLibStreamHandle, Deflate_DefaultWindowBits); }
public static ErrorCode CreateZLibStreamForDeflate(out ZLibStreamHandle zLibStreamHandle) { return CreateZLibStreamForDeflate(out zLibStreamHandle, CompressionLevel.DefaultCompression, Deflate_DefaultWindowBits, Deflate_DefaultMemLevel, CompressionStrategy.DefaultStrategy); }