Example #1
0
        public static bool BrotliEncoderCompressStream(
            IntPtr state, BrotliEncoderOperation operation, ref UInt32 availableIn,
            ref IntPtr nextIn, ref UInt32 availableOut, ref IntPtr nextOut, out UInt32 totalOut)
        {
            if (USE_X86)
            {
                return(Brolib32.BrotliEncoderCompressStream(
                           state,
                           operation,
                           ref availableIn,
                           ref nextIn,
                           ref availableOut,
                           ref nextOut,
                           out totalOut));
            }

            UInt64 availableInL  = availableIn;
            UInt64 availableOutL = availableOut;
            UInt64 totalOutL     = 0;

            bool result = Brolib64.BrotliEncoderCompressStream(
                state,
                operation,
                ref availableInL,
                ref nextIn,
                ref availableOutL,
                ref nextOut,
                out totalOutL);

            availableIn  = (UInt32)availableInL;
            availableOut = (UInt32)availableOutL;
            totalOut     = (UInt32)totalOutL;

            return(result);
        }