Exemple #1
0
        private ZReturnConsts do_deflate(ZFlushConsts flush, out int avail_out)
        {
            avail_out = BUFFER_SIZE;
            ZReturnConsts ret_val = z_stream_deflate(z_stream, flush, sized_buffer, ref avail_out);

            switch (ret_val)
            {
            case ZReturnConsts.Z_STREAM_ERROR:
                throw new InvalidOperationException("Internal error.");

            case ZReturnConsts.Z_MEM_ERROR:
                throw new InvalidOperationException("Memory error.");
            }
            return(ret_val);
        }
Exemple #2
0
 static extern ZReturnConsts z_stream_deflate(IntPtr z_stream, ZFlushConsts flush, IntPtr next_out, ref int avail_out);