2023-02-26 18:31:44 +00:00
|
|
|
// <auto-generated>
|
|
|
|
// This code is generated via csbindgen.
|
|
|
|
// DON'T CHANGE THIS DIRECTLY.
|
|
|
|
// </auto-generated>
|
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
2023-02-27 11:06:18 +00:00
|
|
|
namespace CsBindgen
|
2023-02-26 18:31:44 +00:00
|
|
|
{
|
|
|
|
using LZ4_byte = Byte;
|
|
|
|
using LZ4_streamDecode_t = LZ4_streamDecode_u;
|
|
|
|
using LZ4_stream_t = LZ4_stream_u;
|
|
|
|
using LZ4_u32 = UInt32;
|
|
|
|
|
|
|
|
|
|
|
|
public static unsafe partial class NativeMethods
|
|
|
|
{
|
2023-02-27 11:06:18 +00:00
|
|
|
const string __DllName = "";
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_versionNumber();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Byte* LZ4_versionString();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_default(Byte* src, Byte* dst, Int32 srcSize, Int32 dstCapacity);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_safe(Byte* src, Byte* dst, Int32 compressedSize, Int32 dstCapacity);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compressBound(Int32 inputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_fast(Byte* src, Byte* dst, Int32 srcSize, Int32 dstCapacity, Int32 acceleration);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_sizeofState();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_fast_extState(void* state, Byte* src, Byte* dst, Int32 srcSize, Int32 dstCapacity, Int32 acceleration);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_destSize(Byte* src, Byte* dst, Int32* srcSizePtr, Int32 targetDstSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_safe_partial(Byte* src, Byte* dst, Int32 srcSize, Int32 targetOutputSize, Int32 dstCapacity);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern LZ4_stream_t* LZ4_createStream();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_freeStream(LZ4_stream_t* streamPtr);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern void LZ4_resetStream_fast(LZ4_stream_t* streamPtr);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_loadDict(LZ4_stream_t* streamPtr, Byte* dictionary, Int32 dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_fast_continue(LZ4_stream_t* streamPtr, Byte* src, Byte* dst, Int32 srcSize, Int32 dstCapacity, Int32 acceleration);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_saveDict(LZ4_stream_t* streamPtr, Byte* safeBuffer, Int32 maxDictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern LZ4_streamDecode_t* LZ4_createStreamDecode();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_freeStreamDecode(LZ4_streamDecode_t* LZ4_stream);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_setStreamDecode(LZ4_streamDecode_t* LZ4_streamDecode, Byte* dictionary, Int32 dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decoderRingBufferSize(Int32 maxBlockSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_safe_continue(LZ4_streamDecode_t* LZ4_streamDecode, Byte* src, Byte* dst, Int32 srcSize, Int32 dstCapacity);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_safe_usingDict(Byte* src, Byte* dst, Int32 srcSize, Int32 dstCapacity, Byte* dictStart, Int32 dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_safe_partial_usingDict(Byte* src, Byte* dst, Int32 compressedSize, Int32 targetOutputSize, Int32 maxOutputSize, Byte* dictStart, Int32 dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern void __va_start(Byte** arg1);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern void __security_init_cookie();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern void __security_check_cookie(UIntPtr _StackCookie);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern LZ4_stream_t* LZ4_initStream(void* buffer, UIntPtr size);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress(Byte* src, Byte* dest, Int32 srcSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_limitedOutput(Byte* src, Byte* dest, Int32 srcSize, Int32 maxOutputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_withState(void* state, Byte* source, Byte* dest, Int32 inputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_limitedOutput_withState(void* state, Byte* source, Byte* dest, Int32 inputSize, Int32 maxOutputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_continue(LZ4_stream_t* LZ4_streamPtr, Byte* source, Byte* dest, Int32 inputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_compress_limitedOutput_continue(LZ4_stream_t* LZ4_streamPtr, Byte* source, Byte* dest, Int32 inputSize, Int32 maxOutputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_uncompress(Byte* source, Byte* dest, Int32 outputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_uncompress_unknownOutputSize(Byte* source, Byte* dest, Int32 isize_, Int32 maxOutputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern void* LZ4_create(Byte* inputBuffer);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_sizeofStreamState();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_resetStreamState(void* state, Byte* inputBuffer);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Byte* LZ4_slideInputBuffer(void* state);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_safe_withPrefix64k(Byte* src, Byte* dst, Int32 compressedSize, Int32 maxDstSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_fast_withPrefix64k(Byte* src, Byte* dst, Int32 originalSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_fast(Byte* src, Byte* dst, Int32 originalSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_fast_continue(LZ4_streamDecode_t* LZ4_streamDecode, Byte* src, Byte* dst, Int32 originalSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern Int32 LZ4_decompress_fast_usingDict(Byte* src, Byte* dst, Int32 originalSize, Byte* dictStart, Int32 dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 11:06:18 +00:00
|
|
|
public static extern void LZ4_resetStream(LZ4_stream_t* streamPtr);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
public unsafe struct LZ4_stream_t_internal
|
|
|
|
{
|
|
|
|
public fixed LZ4_u32 hashTable[4096];
|
|
|
|
public LZ4_byte* dictionary;
|
|
|
|
public LZ4_stream_t_internal* dictCtx;
|
|
|
|
public LZ4_u32 currentOffset;
|
|
|
|
public LZ4_u32 tableType;
|
|
|
|
public LZ4_u32 dictSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Explicit)]
|
|
|
|
public unsafe struct LZ4_stream_u
|
|
|
|
{
|
|
|
|
[FieldOffset(0)]
|
|
|
|
public fixed Byte minStateSize[16416];
|
|
|
|
[FieldOffset(0)]
|
|
|
|
public LZ4_stream_t_internal internal_donotuse;
|
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
public unsafe struct LZ4_streamDecode_t_internal
|
|
|
|
{
|
|
|
|
public LZ4_byte* externalDict;
|
|
|
|
public LZ4_byte* prefixEnd;
|
|
|
|
public UIntPtr extDictSize;
|
|
|
|
public UIntPtr prefixSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Explicit)]
|
|
|
|
public unsafe struct LZ4_streamDecode_u
|
|
|
|
{
|
|
|
|
[FieldOffset(0)]
|
|
|
|
public fixed Byte minStateSize[32];
|
|
|
|
[FieldOffset(0)]
|
|
|
|
public LZ4_streamDecode_t_internal internal_donotuse;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|