Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Interop.cs
Go to the documentation of this file.
1using System;
5
6internal static class Interop
7{
8 internal static class Brotli
9 {
10 [DllImport("System.IO.Compression.Native")]
11 internal static extern SafeBrotliDecoderHandle BrotliDecoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque);
12
13 [DllImport("System.IO.Compression.Native")]
14 internal unsafe static extern int BrotliDecoderDecompressStream(SafeBrotliDecoderHandle state, ref nuint availableIn, byte** nextIn, ref nuint availableOut, byte** nextOut, out nuint totalOut);
15
16 [DllImport("System.IO.Compression.Native")]
17 internal unsafe static extern BOOL BrotliDecoderDecompress(nuint availableInput, byte* inBytes, nuint* availableOutput, byte* outBytes);
18
19 [DllImport("System.IO.Compression.Native")]
20 internal static extern void BrotliDecoderDestroyInstance(IntPtr state);
21
22 [DllImport("System.IO.Compression.Native")]
24
25 [DllImport("System.IO.Compression.Native")]
26 internal static extern SafeBrotliEncoderHandle BrotliEncoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque);
27
28 [DllImport("System.IO.Compression.Native")]
30
31 [DllImport("System.IO.Compression.Native")]
32 internal unsafe static extern BOOL BrotliEncoderCompressStream(SafeBrotliEncoderHandle state, BrotliEncoderOperation op, ref nuint availableIn, byte** nextIn, ref nuint availableOut, byte** nextOut, out nuint totalOut);
33
34 [DllImport("System.IO.Compression.Native")]
36
37 [DllImport("System.IO.Compression.Native")]
38 internal static extern void BrotliEncoderDestroyInstance(IntPtr state);
39
40 [DllImport("System.IO.Compression.Native")]
41 internal unsafe static extern BOOL BrotliEncoderCompress(int quality, int window, int v, nuint availableInput, byte* inBytes, nuint* availableOutput, byte* outBytes);
42 }
43
44 internal enum BOOL
45 {
46 FALSE,
47 TRUE
48 }
49}
static unsafe BOOL BrotliEncoderCompress(int quality, int window, int v, nuint availableInput, byte *inBytes, nuint *availableOutput, byte *outBytes)
static void BrotliEncoderDestroyInstance(IntPtr state)
static void BrotliDecoderDestroyInstance(IntPtr state)
static unsafe int BrotliDecoderDecompressStream(SafeBrotliDecoderHandle state, ref nuint availableIn, byte **nextIn, ref nuint availableOut, byte **nextOut, out nuint totalOut)
static BOOL BrotliDecoderIsFinished(SafeBrotliDecoderHandle state)
static SafeBrotliDecoderHandle BrotliDecoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque)
static BOOL BrotliEncoderSetParameter(SafeBrotliEncoderHandle state, BrotliEncoderParameter parameter, uint value)
static unsafe BOOL BrotliDecoderDecompress(nuint availableInput, byte *inBytes, nuint *availableOutput, byte *outBytes)
static BOOL BrotliEncoderHasMoreOutput(SafeBrotliEncoderHandle state)
static SafeBrotliEncoderHandle BrotliEncoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque)
static unsafe BOOL BrotliEncoderCompressStream(SafeBrotliEncoderHandle state, BrotliEncoderOperation op, ref nuint availableIn, byte **nextIn, ref nuint availableOut, byte **nextOut, out nuint totalOut)