2023-02-26 18:31:44 +00:00
|
|
|
// <auto-generated>
|
2023-02-27 23:08:46 +00:00
|
|
|
// This code is generated by csbindgen.
|
2023-02-26 18:31:44 +00:00
|
|
|
// 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
|
|
|
{
|
2023-02-27 22:18:10 +00:00
|
|
|
public static unsafe partial class LibLz4
|
2023-02-26 18:31:44 +00:00
|
|
|
{
|
2023-02-27 22:18:10 +00:00
|
|
|
const string __DllName = "liblz4";
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_versionNumber();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern byte* LZ4_versionString();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_default(byte* src, byte* dst, int srcSize, int dstCapacity);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_safe(byte* src, byte* dst, int compressedSize, int dstCapacity);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compressBound(int inputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_fast(byte* src, byte* dst, int srcSize, int dstCapacity, int acceleration);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_sizeofState();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_fast_extState(void* state, byte* src, byte* dst, int srcSize, int dstCapacity, int acceleration);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_destSize(byte* src, byte* dst, int* srcSizePtr, int targetDstSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_safe_partial(byte* src, byte* dst, int srcSize, int targetOutputSize, int dstCapacity);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern LZ4_stream_u* LZ4_createStream();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_freeStream(LZ4_stream_u* streamPtr);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern void LZ4_resetStream_fast(LZ4_stream_u* streamPtr);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_loadDict(LZ4_stream_u* streamPtr, byte* dictionary, int dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_fast_continue(LZ4_stream_u* streamPtr, byte* src, byte* dst, int srcSize, int dstCapacity, int acceleration);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_saveDict(LZ4_stream_u* streamPtr, byte* safeBuffer, int maxDictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern LZ4_streamDecode_u* LZ4_createStreamDecode();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_freeStreamDecode(LZ4_streamDecode_u* LZ4_stream);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_setStreamDecode(LZ4_streamDecode_u* LZ4_streamDecode, byte* dictionary, int dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decoderRingBufferSize(int maxBlockSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_safe_continue(LZ4_streamDecode_u* LZ4_streamDecode, byte* src, byte* dst, int srcSize, int dstCapacity);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_safe_usingDict(byte* src, byte* dst, int srcSize, int dstCapacity, byte* dictStart, int dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_safe_partial_usingDict(byte* src, byte* dst, int compressedSize, int targetOutputSize, int maxOutputSize, byte* dictStart, int dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern LZ4_stream_u* LZ4_initStream(void* buffer, UIntPtr size);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress(byte* src, byte* dest, int srcSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_limitedOutput(byte* src, byte* dest, int srcSize, int maxOutputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_withState(void* state, byte* source, byte* dest, int inputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_limitedOutput_withState(void* state, byte* source, byte* dest, int inputSize, int maxOutputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_continue(LZ4_stream_u* LZ4_streamPtr, byte* source, byte* dest, int inputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_compress_limitedOutput_continue(LZ4_stream_u* LZ4_streamPtr, byte* source, byte* dest, int inputSize, int maxOutputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_uncompress(byte* source, byte* dest, int outputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_uncompress_unknownOutputSize(byte* source, byte* dest, int isize_, int maxOutputSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +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 22:18:10 +00:00
|
|
|
public static extern int LZ4_sizeofStreamState();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_resetStreamState(void* state, byte* inputBuffer);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +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 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_safe_withPrefix64k(byte* src, byte* dst, int compressedSize, int maxDstSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_fast_withPrefix64k(byte* src, byte* dst, int originalSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_fast(byte* src, byte* dst, int originalSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_fast_continue(LZ4_streamDecode_u* LZ4_streamDecode, byte* src, byte* dst, int originalSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern int LZ4_decompress_fast_usingDict(byte* src, byte* dst, int originalSize, byte* dictStart, int dictSize);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
[DllImport(__DllName, CallingConvention = CallingConvention.Cdecl)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public static extern void LZ4_resetStream(LZ4_stream_u* streamPtr);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
public unsafe struct LZ4_stream_t_internal
|
|
|
|
{
|
2023-02-27 22:18:10 +00:00
|
|
|
public fixed uint hashTable[4096];
|
|
|
|
public byte* dictionary;
|
2023-02-26 18:31:44 +00:00
|
|
|
public LZ4_stream_t_internal* dictCtx;
|
2023-02-27 22:18:10 +00:00
|
|
|
public uint currentOffset;
|
|
|
|
public uint tableType;
|
|
|
|
public uint dictSize;
|
2023-02-26 18:31:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Explicit)]
|
|
|
|
public unsafe struct LZ4_stream_u
|
|
|
|
{
|
|
|
|
[FieldOffset(0)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public fixed byte minStateSize[16416];
|
2023-02-26 18:31:44 +00:00
|
|
|
[FieldOffset(0)]
|
|
|
|
public LZ4_stream_t_internal internal_donotuse;
|
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
public unsafe struct LZ4_streamDecode_t_internal
|
|
|
|
{
|
2023-02-27 22:18:10 +00:00
|
|
|
public byte* externalDict;
|
|
|
|
public byte* prefixEnd;
|
2023-02-26 18:31:44 +00:00
|
|
|
public UIntPtr extDictSize;
|
|
|
|
public UIntPtr prefixSize;
|
|
|
|
}
|
|
|
|
|
|
|
|
[StructLayout(LayoutKind.Explicit)]
|
|
|
|
public unsafe struct LZ4_streamDecode_u
|
|
|
|
{
|
|
|
|
[FieldOffset(0)]
|
2023-02-27 22:18:10 +00:00
|
|
|
public fixed byte minStateSize[32];
|
2023-02-26 18:31:44 +00:00
|
|
|
[FieldOffset(0)]
|
|
|
|
public LZ4_streamDecode_t_internal internal_donotuse;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|