Esempio n. 1
0
        public ZlibTransform(CompressionMode mode)
        {
            this.Mode = mode;
            switch (mode)
            {
            case CompressionMode.Decompress:
                ZLibNative.CreateZLibStreamForInflate(out handle, -15);
                break;

            case CompressionMode.Compress:
                ZLibNative.CreateZLibStreamForDeflate(out handle);
                break;
            }
        }
Esempio n. 2
0
 public static ZLibNative.ErrorCode CreateZLibStreamForInflate(out ZLibNative.ZLibStreamHandle zLibStreamHandle)
 {
     return(ZLibNative.CreateZLibStreamForInflate(out zLibStreamHandle, -15));
 }
Esempio n. 3
0
 public static ZLibNative.ErrorCode CreateZLibStreamForDeflate(out ZLibNative.ZLibStreamHandle zLibStreamHandle)
 {
     return(ZLibNative.CreateZLibStreamForDeflate(out zLibStreamHandle, ZLibNative.CompressionLevel.DefaultCompression, -15, 8, ZLibNative.CompressionStrategy.DefaultStrategy));
 }