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); }
public static BrotliDecoderResult BrotliDecoderDecompressStream( IntPtr state, ref UInt32 availableIn, ref IntPtr nextIn, ref UInt32 availableOut, ref IntPtr nextOut, out UInt32 totalOut) { if (USE_X86) { return(Brolib32.BrotliDecoderDecompressStream( state, ref availableIn, ref nextIn, ref availableOut, ref nextOut, out totalOut)); } UInt64 availableInL = availableIn; UInt64 availableOutL = availableOut; UInt64 totalOutL = 0; BrotliDecoderResult result = Brolib64.BrotliDecoderDecompressStream( state, ref availableInL, ref nextIn, ref availableOutL, ref nextOut, out totalOutL); availableIn = (UInt32)availableInL; availableOut = (UInt32)availableOutL; totalOut = (UInt32)totalOutL; return(result); }
public static bool BrotliEncoderSetParameter( IntPtr state, BrotliEncoderParameter parameter, UInt32 value) { return(USE_X86 ? Brolib32.BrotliEncoderSetParameter(state, parameter, value) : Brolib64.BrotliEncoderSetParameter(state, parameter, value)); }
public static string BrotliDecoderErrorString(Int32 code) { IntPtr result = USE_X86 ? Brolib32.BrotliDecoderErrorString(code) : Brolib64.BrotliDecoderErrorString(code); return(result != IntPtr.Zero ? Marshal.PtrToStringAnsi(result) : string.Empty); }
public static void BrotliEncoderDestroyInstance(IntPtr state) { if (USE_X86) { Brolib32.BrotliEncoderDestroyInstance(state); return; } Brolib64.BrotliEncoderDestroyInstance(state); }
public static void BrotliEncoderSetCustomDictionary( IntPtr state, UInt32 size, IntPtr dict) { if (USE_X86) { Brolib32.BrotliEncoderSetCustomDictionary(state, size, dict); return; } Brolib64.BrotliEncoderSetCustomDictionary(state, size, dict); }
public static bool BrotliEncoderIsFinished(IntPtr state) { if (UseX86) { return(Brolib32.BrotliEncoderIsFinished(state)); } else { return(Brolib64.BrotliEncoderIsFinished(state)); } }
public static UInt32 BrotliDecoderVersion() { if (UseX86) { return(Brolib32.BrotliDecoderVersion()); } else { return(Brolib64.BrotliDecoderVersion()); } }
public static Int32 BrotliDecoderGetErrorCode(IntPtr state) { if (UseX86) { return(Brolib32.BrotliDecoderGetErrorCode(state)); } else { return(Brolib64.BrotliDecoderGetErrorCode(state)); } }
public static IntPtr BrotliDecoderCreateInstance() { if (UseX86) { return(Brolib32.BrotliDecoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero)); } else { return(Brolib64.BrotliDecoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero)); } }
public static void BrotliDecoderDestroyInstance(IntPtr state) { if (UseX86) { Brolib32.BrotliDecoderDestroyInstance(state); } else { Brolib64.BrotliDecoderDestroyInstance(state); } }
public static void BrotliEncoderSetCustomDictionary(IntPtr state, UInt32 size, IntPtr dict) { if (UseX86) { Brolib32.BrotliEncoderSetCustomDictionary(state, size, dict); } else { Brolib64.BrotliEncoderSetCustomDictionary(state, size, dict); } }
public static bool BrotliEncoderSetParameter(IntPtr state, BrotliEncoderParameter parameter, UInt32 value) { if (UseX86) { return(Brolib32.BrotliEncoderSetParameter(state, parameter, value)); } else { return(Brolib64.BrotliEncoderSetParameter(state, parameter, value)); } }
public static IntPtr BrotliEncoderTakeOutput(IntPtr state, ref UInt32 size) { if (UseX86) { return(Brolib32.BrotliEncoderTakeOutput(state, ref size)); } else { UInt64 longSize = size; var r = Brolib64.BrotliEncoderTakeOutput(state, ref longSize); size = (UInt32)longSize; return(r); } }
public static String BrotliDecoderErrorString(Int32 code) { IntPtr r = IntPtr.Zero; if (UseX86) { r = Brolib32.BrotliDecoderErrorString(code); } else { r = Brolib64.BrotliDecoderErrorString(code); } if (r != IntPtr.Zero) { return(Marshal.PtrToStringAnsi(r)); } return(String.Empty); }
public static bool BrotliDecoderIsUsed(IntPtr state) { return(USE_X86 ? Brolib32.BrotliDecoderIsUsed(state) : Brolib64.BrotliDecoderIsUsed(state)); }
public static bool BrotliEncoderIsFinished(IntPtr state) { return(USE_X86 ? Brolib32.BrotliEncoderIsFinished(state) : Brolib64.BrotliEncoderIsFinished(state)); }
public static Int32 BrotliDecoderGetErrorCode(IntPtr state) { return(USE_X86 ? Brolib32.BrotliDecoderGetErrorCode(state) : Brolib64.BrotliDecoderGetErrorCode(state)); }
public static UInt32 BrotliEncoderVersion() { return(USE_X86 ? Brolib32.BrotliEncoderVersion() : Brolib64.BrotliEncoderVersion()); }
public static IntPtr BrotliDecoderCreateInstance() { return(USE_X86 ? Brolib32.BrotliDecoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) : Brolib64.BrotliDecoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero)); }