Exemplo n.º 1
0
 internal static extern ZLibReturnCode DeflateInit2(
     ZStream strm,
     ZLibCompLevel level,
     ZLibCompMethod method,
     ZLibWriteType windowBits,
     int memLevel,
     ZLibCompressionStrategy strategy,
     [MarshalAs(UnmanagedType.LPStr)] string version,
     int stream_size);
Exemplo n.º 2
0
 internal static int deflateInit(ref z_stream strm, CompressionLevel level, ZLibWriteType windowBits)
 {
     if (ZLibDll.Is64)
     {
         return(deflateInit2_64(ref strm, (int)level, Z_DEFLATED, (int)windowBits, DEF_MEM_LEVEL,
                                Z_DEFAULT_STRATEGY, ZLibVersion, Marshal.SizeOf(typeof(z_stream))));
     }
     else
     {
         return(deflateInit2_32(ref strm, (int)level, Z_DEFLATED, (int)windowBits, DEF_MEM_LEVEL,
                                Z_DEFAULT_STRATEGY, ZLibVersion, Marshal.SizeOf(typeof(z_stream))));
     }
 }
Exemplo n.º 3
0
 public ZLibStream(Stream stream, ZLibMode mode, ZLibCompLevel level, ZLibWriteType writeType, bool leaveOpen = false) : this(stream, mode, level, leaveOpen)
 {
     _writeType = writeType;
 }
Exemplo n.º 4
0
 internal static ZLibReturnCode DeflateInit(ZStream stream, ZLibCompLevel level, ZLibWriteType windowBits)
 {
     return(DeflateInit2(stream, level, ZLibCompMethod.DEFLATED, windowBits, DEF_MEM_LEVEL, ZLibCompressionStrategy.DEFAULT_STRATEGY, ZLIB_VERSION, Marshal.SizeOf(typeof(ZStream))));
 }