Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
NativeLZ4Base.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under BSD 2-Clause License. See LICENSE.md for details.
3 using System.Runtime.InteropServices;
4 
5 namespace SiliconStudio.Core.LZ4.Services
6 {
7  internal abstract class NativeLZ4Base
8  {
9  static NativeLZ4Base()
10  {
11  NativeLibrary.PreloadLibrary(NativeLibrary.LibraryName);
12  }
13 
14  [DllImport(NativeLibrary.LibraryName, CallingConvention = NativeLibrary.CallConvention)]
15  protected unsafe static extern int I32_LZ4_uncompress(byte* source, byte* dest, int maxOutputSize);
16 
17  [DllImport(NativeLibrary.LibraryName, CallingConvention = NativeLibrary.CallConvention)]
18  protected unsafe static extern int I32_LZ4_uncompress_unknownOutputSize(byte* source, byte* dest, int inputSize, int maxOutputSize);
19 
20  [DllImport(NativeLibrary.LibraryName, CallingConvention = NativeLibrary.CallConvention)]
21  protected unsafe static extern int I32_LZ4_compress_limitedOutput(byte* source, byte* dest, int inputSize, int maxOutputSize);
22 
23  [DllImport(NativeLibrary.LibraryName, CallingConvention = NativeLibrary.CallConvention)]
24  protected unsafe static extern int I32_LZ4_compressHC_limitedOutput(byte* source, byte* dest, int inputSize, int maxOutputSize);
25 
26  [DllImport(NativeLibrary.LibraryName, CallingConvention = NativeLibrary.CallConvention)]
27  protected unsafe static extern int I64_LZ4_uncompress(byte* source, byte* dest, int maxOutputSize);
28 
29  [DllImport(NativeLibrary.LibraryName, CallingConvention = NativeLibrary.CallConvention)]
30  protected unsafe static extern int I64_LZ4_uncompress_unknownOutputSize(byte* source, byte* dest, int inputSize, int maxOutputSize);
31 
32  [DllImport(NativeLibrary.LibraryName, CallingConvention = NativeLibrary.CallConvention)]
33  protected unsafe static extern int I64_LZ4_compress_limitedOutput(byte* source, byte* dest, int inputSize, int maxOutputSize);
34 
35  [DllImport(NativeLibrary.LibraryName, CallingConvention = NativeLibrary.CallConvention)]
36  protected unsafe static extern int I64_LZ4_compressHC_limitedOutput(byte* source, byte* dest, int inputSize, int maxOutputSize);
37 
38  }
39 }
char int int maxOutputSize
Definition: lz4.h:103
char * dest
Definition: lz4.h:61
char int inputSize
Definition: lz4.h:61