You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
downkyi/Brotli.Core/Interop/Brolib64.cs

63 lines
3.3 KiB

using System;
using System.Runtime.InteropServices;
namespace Brotli
{
class Brolib64
{
static Brolib64()
{
var path = LibPathBootStrapper.LibPath;
NativeLibraryLoader nl = new NativeLibraryLoader(path);
#region set encoder
nl.FillDelegate(out BrotliEncoderCreateInstance);
nl.FillDelegate(out BrotliEncoderSetParameter);
nl.FillDelegate(out BrotliEncoderCompressStream);
nl.FillDelegate(out BrotliEncoderIsFinished);
nl.FillDelegate(out BrotliEncoderDestroyInstance);
nl.FillDelegate(out BrotliEncoderVersion);
nl.FillDelegate(out BrotliEncoderVersion);
nl.FillDelegate(out BrotliEncoderTakeOutput);
#endregion
#region set decoder
nl.FillDelegate(out BrotliDecoderCreateInstance);
nl.FillDelegate(out BrotliDecoderSetParameter);
nl.FillDelegate(out BrotliDecoderDecompressStream);
nl.FillDelegate(out BrotliDecoderDestroyInstance);
nl.FillDelegate(out BrotliDecoderVersion);
nl.FillDelegate(out BrotliDecoderIsUsed);
nl.FillDelegate(out BrotliDecoderIsFinished);
nl.FillDelegate(out BrotliDecoderGetErrorCode);
nl.FillDelegate(out BrotliDecoderErrorString);
nl.FillDelegate(out BrotliDecoderTakeOutput);
#endregion
}
#region Encoder
internal static Delegate64.BrotliEncoderCreateInstanceDelegate BrotliEncoderCreateInstance;
internal static Delegate64.BrotliEncoderSetParameterDelegate BrotliEncoderSetParameter;
//internal static Delegate64.BrotliEncoderSetCustomDictionaryDelegate BrotliEncoderSetCustomDictionary;
internal static Delegate64.BrotliEncoderCompressStreamDelegate BrotliEncoderCompressStream;
internal static Delegate64.BrotliEncoderIsFinishedDelegate BrotliEncoderIsFinished;
internal static Delegate64.BrotliEncoderDestroyInstanceDelegate BrotliEncoderDestroyInstance;
internal static Delegate64.BrotliEncoderVersionDelegate BrotliEncoderVersion;
internal static Delegate64.BrotliEncoderTakeOutputDelegate BrotliEncoderTakeOutput;
#endregion
#region Decoder
internal static Delegate64.BrotliDecoderCreateInstanceDelegate BrotliDecoderCreateInstance;
internal static Delegate64.BrotliDecoderSetParameter BrotliDecoderSetParameter;
//internal static Delegate64.BrotliDecoderSetCustomDictionary BrotliDecoderSetCustomDictionary;
internal static Delegate64.BrotliDecoderDecompressStreamDelegate BrotliDecoderDecompressStream;
internal static Delegate64.BrotliDecoderDestroyInstanceDelegate BrotliDecoderDestroyInstance;
internal static Delegate64.BrotliDecoderVersionDelegate BrotliDecoderVersion;
internal static Delegate64.BrotliDecoderIsUsedDelegate BrotliDecoderIsUsed;
internal static Delegate64.BrotliDecoderIsFinishedDelegate BrotliDecoderIsFinished;
internal static Delegate64.BrotliDecoderGetErrorCodeDelegate BrotliDecoderGetErrorCode;
internal static Delegate64.BrotliDecoderErrorStringDelegate BrotliDecoderErrorString;
internal static Delegate64.BrotliDecoderTakeOutputDelegate BrotliDecoderTakeOutput;
#endregion
}
}