Ejemplo n.º 1
0
            internal static unsafe ZLibNative.ErrorCode DeflateEnd(ref ZLibNative.ZStream stream)
            {
                fixed(ZLibNative.ZStream *streamBytes = &stream)
                {
                    byte *pBytes = (byte *)streamBytes;

                    return((ZLibNative.ErrorCode)deflateEnd(pBytes));
                }
            }
Ejemplo n.º 2
0
            internal static unsafe ZLibNative.ErrorCode Deflate(ref ZLibNative.ZStream stream,
                                                                ZLibNative.FlushCode flush)
            {
                fixed(ZLibNative.ZStream *streamBytes = &stream)
                {
                    byte *pBytes = (byte *)streamBytes;

                    return((ZLibNative.ErrorCode)deflate(pBytes, (int)flush));
                }
            }
Ejemplo n.º 3
0
            internal static unsafe ZLibNative.ErrorCode InflateInit2_(
                ref ZLibNative.ZStream stream,
                int windowBits)
            {
                fixed(byte *versionString = ZLibVersion)
                fixed(ZLibNative.ZStream * streamBytes = &stream)
                {
                    byte *pBytes = (byte *)streamBytes;

                    return
                        ((ZLibNative.ErrorCode)
                         inflateInit2_(pBytes, (int)windowBits, versionString, sizeof(ZLibNative.ZStream)));
                }
            }
Ejemplo n.º 4
0
            internal static unsafe ZLibNative.ErrorCode DeflateInit2_(
                ref ZLibNative.ZStream stream,
                ZLibNative.CompressionLevel level,
                ZLibNative.CompressionMethod method,
                int windowBits,
                int memLevel,
                ZLibNative.CompressionStrategy strategy)
            {
                fixed(byte *versionString = ZLibVersion)
                fixed(ZLibNative.ZStream * streamBytes = &stream)
                {
                    byte *pBytes = (byte *)streamBytes;

                    return
                        ((ZLibNative.ErrorCode)
                         deflateInit2_(pBytes, (int)level, (int)method, (int)windowBits, (int)memLevel,
                                       (int)strategy, versionString, sizeof(ZLibNative.ZStream)));
                }
            }