|
// <auto-generated/>
internal static unsafe partial class Interop
{
internal static unsafe partial class ZLib
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "CompressionNative_DeflateInit2_", ExactSpelling = true)]
internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode DeflateInit2_(global::System.IO.Compression.ZLibNative.ZStream* stream, global::System.IO.Compression.ZLibNative.CompressionLevel level, global::System.IO.Compression.ZLibNative.CompressionMethod method, int windowBits, int memLevel, global::System.IO.Compression.ZLibNative.CompressionStrategy strategy);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class ZLib
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "CompressionNative_Deflate", ExactSpelling = true)]
internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode Deflate(global::System.IO.Compression.ZLibNative.ZStream* stream, global::System.IO.Compression.ZLibNative.FlushCode flush);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class ZLib
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "CompressionNative_DeflateEnd", ExactSpelling = true)]
internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode DeflateEnd(global::System.IO.Compression.ZLibNative.ZStream* stream);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class ZLib
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "CompressionNative_InflateInit2_", ExactSpelling = true)]
internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode InflateInit2_(global::System.IO.Compression.ZLibNative.ZStream* stream, int windowBits);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class ZLib
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "CompressionNative_InflateReset2_", ExactSpelling = true)]
internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode InflateReset2_(global::System.IO.Compression.ZLibNative.ZStream* stream, int windowBits);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class ZLib
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "CompressionNative_Inflate", ExactSpelling = true)]
internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode Inflate(global::System.IO.Compression.ZLibNative.ZStream* stream, global::System.IO.Compression.ZLibNative.FlushCode flush);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class ZLib
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "CompressionNative_InflateEnd", ExactSpelling = true)]
internal static unsafe extern partial global::System.IO.Compression.ZLibNative.ErrorCode InflateEnd(global::System.IO.Compression.ZLibNative.ZStream* stream);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class ZLib
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "CompressionNative_Crc32", ExactSpelling = true)]
internal static unsafe extern partial uint crc32(uint crc, byte* buffer, int len);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
private static partial int PathConf(string path, global::Interop.Sys.PathConfName name)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, name);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PathConf", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.PathConfName __name_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial int Stat(string path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial int LStat(string path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle ZSTD_createCCtx()
{
bool __invokeSucceeded = default;
global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle __retVal = default;
nint __retVal_native = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
try
{
{
__retVal_native = __PInvoke();
}
__invokeSucceeded = true;
// UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
__retVal_native__marshaller.FromUnmanaged(__retVal_native);
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native__marshaller.ToManaged();
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
__retVal_native__marshaller.Free();
}
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_createCCtx", ExactSpelling = true)]
static extern unsafe nint __PInvoke();
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_freeCCtx", ExactSpelling = true)]
internal static extern partial nuint ZSTD_freeCCtx(nint cctx);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle ZSTD_createDCtx()
{
bool __invokeSucceeded = default;
global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle __retVal = default;
nint __retVal_native = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
try
{
{
__retVal_native = __PInvoke();
}
__invokeSucceeded = true;
// UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
__retVal_native__marshaller.FromUnmanaged(__retVal_native);
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native__marshaller.ToManaged();
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
__retVal_native__marshaller.Free();
}
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_createDCtx", ExactSpelling = true)]
static extern unsafe nint __PInvoke();
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_freeDCtx", ExactSpelling = true)]
internal static extern partial nuint ZSTD_freeDCtx(nint dctx);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static unsafe partial global::Microsoft.Win32.SafeHandles.SafeZstdCDictHandle ZSTD_createCDict_byReference(byte* dictBuffer, nuint dictSize, int compressionLevel)
{
bool __invokeSucceeded = default;
global::Microsoft.Win32.SafeHandles.SafeZstdCDictHandle __retVal = default;
nint __retVal_native = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCDictHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
try
{
{
__retVal_native = __PInvoke(dictBuffer, dictSize, compressionLevel);
}
__invokeSucceeded = true;
// UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
__retVal_native__marshaller.FromUnmanaged(__retVal_native);
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native__marshaller.ToManaged();
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
__retVal_native__marshaller.Free();
}
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_createCDict_byReference", ExactSpelling = true)]
static extern unsafe nint __PInvoke(byte* __dictBuffer_native, nuint __dictSize_native, int __compressionLevel_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_freeCDict", ExactSpelling = true)]
internal static extern partial nuint ZSTD_freeCDict(nint cdict);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static unsafe partial global::Microsoft.Win32.SafeHandles.SafeZstdDDictHandle ZSTD_createDDict_byReference(byte* dictBuffer, nuint dictSize)
{
bool __invokeSucceeded = default;
global::Microsoft.Win32.SafeHandles.SafeZstdDDictHandle __retVal = default;
nint __retVal_native = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDDictHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
try
{
{
__retVal_native = __PInvoke(dictBuffer, dictSize);
}
__invokeSucceeded = true;
// UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
__retVal_native__marshaller.FromUnmanaged(__retVal_native);
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native__marshaller.ToManaged();
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
__retVal_native__marshaller.Free();
}
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_createDDict_byReference", ExactSpelling = true)]
static extern unsafe nint __PInvoke(byte* __dictBuffer_native, nuint __dictSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_freeDDict", ExactSpelling = true)]
internal static extern partial nuint ZSTD_freeDDict(nint ddict);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZDICT_trainFromBuffer", ExactSpelling = true)]
internal static unsafe extern partial nuint ZDICT_trainFromBuffer(byte* dictBuffer, nuint dictBufferCapacity, byte* samplesBuffer, nuint* samplesSizes, uint nbSamples);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_compressBound", ExactSpelling = true)]
internal static extern partial nuint ZSTD_compressBound(nuint srcSize);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static unsafe partial nuint ZSTD_compress2(global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle cctx, byte* dst, nuint dstCapacity, byte* src, nuint srcSize)
{
nint __cctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedIn __cctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__cctx_native__marshaller.FromManaged(cctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__cctx_native = __cctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__cctx_native, dst, dstCapacity, src, srcSize);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__cctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_compress2", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __cctx_native, byte* __dst_native, nuint __dstCapacity_native, byte* __src_native, nuint __srcSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static unsafe partial nuint ZSTD_compress_usingCDict(global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle cctx, byte* dst, nuint dstCapacity, byte* src, nuint srcSize, global::Microsoft.Win32.SafeHandles.SafeZstdCDictHandle cdict)
{
nint __cctx_native = default;
nint __cdict_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCDictHandle>.ManagedToUnmanagedIn __cdict_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedIn __cctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__cdict_native__marshaller.FromManaged(cdict);
__cctx_native__marshaller.FromManaged(cctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__cdict_native = __cdict_native__marshaller.ToUnmanaged();
__cctx_native = __cctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__cctx_native, dst, dstCapacity, src, srcSize, __cdict_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__cdict_native__marshaller.Free();
__cctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_compress_usingCDict", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __cctx_native, byte* __dst_native, nuint __dstCapacity_native, byte* __src_native, nuint __srcSize_native, nint __cdict_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_decompress", ExactSpelling = true)]
internal static unsafe extern partial nuint ZSTD_decompress(byte* dst, nuint dstCapacity, byte* src, nuint srcSize);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static unsafe partial nuint ZSTD_decompressDCtx(global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle dctx, byte* dst, nuint dstCapacity, byte* src, nuint srcSize)
{
nint __dctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle>.ManagedToUnmanagedIn __dctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__dctx_native__marshaller.FromManaged(dctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__dctx_native = __dctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__dctx_native, dst, dstCapacity, src, srcSize);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__dctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_decompressDCtx", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __dctx_native, byte* __dst_native, nuint __dstCapacity_native, byte* __src_native, nuint __srcSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static unsafe partial nuint ZSTD_decompress_usingDDict(global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle dctx, byte* dst, nuint dstCapacity, byte* src, nuint srcSize, global::Microsoft.Win32.SafeHandles.SafeZstdDDictHandle ddict)
{
nint __dctx_native = default;
nint __ddict_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDDictHandle>.ManagedToUnmanagedIn __ddict_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle>.ManagedToUnmanagedIn __dctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__ddict_native__marshaller.FromManaged(ddict);
__dctx_native__marshaller.FromManaged(dctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__ddict_native = __ddict_native__marshaller.ToUnmanaged();
__dctx_native = __dctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__dctx_native, dst, dstCapacity, src, srcSize, __ddict_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__ddict_native__marshaller.Free();
__dctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_decompress_usingDDict", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __dctx_native, byte* __dst_native, nuint __dstCapacity_native, byte* __src_native, nuint __srcSize_native, nint __ddict_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_decompressBound", ExactSpelling = true)]
internal static unsafe extern partial ulong ZSTD_decompressBound(byte* src, nuint srcSize);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_decompressStream(global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle dctx, ref global::Interop.Zstd.ZstdOutBuffer output, ref global::Interop.Zstd.ZstdInBuffer input)
{
nint __dctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle>.ManagedToUnmanagedIn __dctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__dctx_native__marshaller.FromManaged(dctx);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Zstd.ZstdInBuffer* __input_native = &input)
fixed (global::Interop.Zstd.ZstdOutBuffer* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__dctx_native = __dctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__dctx_native, __output_native, __input_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__dctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_decompressStream", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __dctx_native, global::Interop.Zstd.ZstdOutBuffer* __output_native, global::Interop.Zstd.ZstdInBuffer* __input_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_DCtx_setParameter(global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle dctx, global::Interop.Zstd.ZstdDParameter param, int value)
{
nint __dctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle>.ManagedToUnmanagedIn __dctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__dctx_native__marshaller.FromManaged(dctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__dctx_native = __dctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__dctx_native, param, value);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__dctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_DCtx_setParameter", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __dctx_native, global::Interop.Zstd.ZstdDParameter __param_native, int __value_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static unsafe partial nuint ZSTD_DCtx_refPrefix(global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle dctx, byte* prefix, nuint prefixSize)
{
nint __dctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle>.ManagedToUnmanagedIn __dctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__dctx_native__marshaller.FromManaged(dctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__dctx_native = __dctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__dctx_native, prefix, prefixSize);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__dctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_DCtx_refPrefix", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __dctx_native, byte* __prefix_native, nuint __prefixSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_DCtx_reset(global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle dctx, global::Interop.Zstd.ZstdResetDirective reset)
{
nint __dctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle>.ManagedToUnmanagedIn __dctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__dctx_native__marshaller.FromManaged(dctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__dctx_native = __dctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__dctx_native, reset);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__dctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_DCtx_reset", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __dctx_native, global::Interop.Zstd.ZstdResetDirective __reset_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_compressStream2(global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle cctx, ref global::Interop.Zstd.ZstdOutBuffer output, ref global::Interop.Zstd.ZstdInBuffer input, global::Interop.Zstd.ZstdEndDirective endOp)
{
nint __cctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedIn __cctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__cctx_native__marshaller.FromManaged(cctx);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Zstd.ZstdInBuffer* __input_native = &input)
fixed (global::Interop.Zstd.ZstdOutBuffer* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__cctx_native = __cctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__cctx_native, __output_native, __input_native, endOp);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__cctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_compressStream2", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __cctx_native, global::Interop.Zstd.ZstdOutBuffer* __output_native, global::Interop.Zstd.ZstdInBuffer* __input_native, global::Interop.Zstd.ZstdEndDirective __endOp_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_CCtx_setParameter(global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle cctx, global::Interop.Zstd.ZstdCParameter param, int value)
{
nint __cctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedIn __cctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__cctx_native__marshaller.FromManaged(cctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__cctx_native = __cctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__cctx_native, param, value);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__cctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_CCtx_setParameter", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __cctx_native, global::Interop.Zstd.ZstdCParameter __param_native, int __value_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static unsafe partial nuint ZSTD_CCtx_refPrefix(global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle cctx, byte* prefix, nuint prefixSize)
{
nint __cctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedIn __cctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__cctx_native__marshaller.FromManaged(cctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__cctx_native = __cctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__cctx_native, prefix, prefixSize);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__cctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_CCtx_refPrefix", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __cctx_native, byte* __prefix_native, nuint __prefixSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_CCtx_reset(global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle cctx, global::Interop.Zstd.ZstdResetDirective reset)
{
nint __cctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedIn __cctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__cctx_native__marshaller.FromManaged(cctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__cctx_native = __cctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__cctx_native, reset);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__cctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_CCtx_reset", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __cctx_native, global::Interop.Zstd.ZstdResetDirective __reset_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_CCtx_setPledgedSrcSize(global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle cctx, ulong pledgedSrcSize)
{
nint __cctx_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedIn __cctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__cctx_native__marshaller.FromManaged(cctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__cctx_native = __cctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__cctx_native, pledgedSrcSize);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__cctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_CCtx_setPledgedSrcSize", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __cctx_native, ulong __pledgedSrcSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_minCLevel", ExactSpelling = true)]
internal static extern partial int ZSTD_minCLevel();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_maxCLevel", ExactSpelling = true)]
internal static extern partial int ZSTD_maxCLevel();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_defaultCLevel", ExactSpelling = true)]
internal static extern partial int ZSTD_defaultCLevel();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_isError", ExactSpelling = true)]
internal static extern partial uint ZSTD_isError(nuint result);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_getErrorName", ExactSpelling = true)]
internal static extern partial nint ZSTD_getErrorName(nuint result);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_DCtx_refDDict(global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle dctx, global::Microsoft.Win32.SafeHandles.SafeZstdDDictHandle ddict)
{
nint __dctx_native = default;
nint __ddict_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDDictHandle>.ManagedToUnmanagedIn __ddict_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdDecompressHandle>.ManagedToUnmanagedIn __dctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__ddict_native__marshaller.FromManaged(ddict);
__dctx_native__marshaller.FromManaged(dctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__ddict_native = __ddict_native__marshaller.ToUnmanaged();
__dctx_native = __dctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__dctx_native, __ddict_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__ddict_native__marshaller.Free();
__dctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_DCtx_refDDict", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __dctx_native, nint __ddict_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Zstd
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
internal static partial nuint ZSTD_CCtx_refCDict(global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle cctx, global::Microsoft.Win32.SafeHandles.SafeZstdCDictHandle cdict)
{
nint __cctx_native = default;
nint __cdict_native = default;
nuint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCDictHandle>.ManagedToUnmanagedIn __cdict_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeZstdCompressHandle>.ManagedToUnmanagedIn __cctx_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__cdict_native__marshaller.FromManaged(cdict);
__cctx_native__marshaller.FromManaged(cctx);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__cdict_native = __cdict_native__marshaller.ToUnmanaged();
__cctx_native = __cctx_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__cctx_native, __cdict_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__cdict_native__marshaller.Free();
__cctx_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.IO.Compression.Native", EntryPoint = "ZSTD_CCtx_refCDict", ExactSpelling = true)]
static extern unsafe nuint __PInvoke(nint __cctx_native, nint __cdict_native);
}
}
}
|