2023-02-26 18:31:44 +00:00
|
|
|
|
// See https://aka.ms/new-console-template for more information
|
2023-02-27 22:18:10 +00:00
|
|
|
|
//using Csbindgen;
|
2023-02-28 01:22:34 +00:00
|
|
|
|
using CsBindgen;
|
2023-02-26 18:31:44 +00:00
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
unsafe
|
|
|
|
|
{
|
2023-02-28 01:22:34 +00:00
|
|
|
|
//var v = NativeMethods();
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
2023-02-28 05:49:04 +00:00
|
|
|
|
var z = LibRust.my_add(100, 200);
|
|
|
|
|
Console.WriteLine(z);
|
|
|
|
|
|
2023-02-28 01:50:15 +00:00
|
|
|
|
var s = LibLz4.LZ4_versionString();
|
2023-02-28 01:22:34 +00:00
|
|
|
|
var ss = new string((sbyte*)s);
|
|
|
|
|
Console.WriteLine(ss);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
|
|
//var bytes = new byte[] { 1, 10, 100, 100, 100, 100, 100, 100 };
|
|
|
|
|
//var dest = new byte[100];
|
|
|
|
|
|
|
|
|
|
//fixed (byte* p = bytes)
|
|
|
|
|
//fixed (byte* d = dest)
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
// var len = NativeMethods.csbindgen_LZ4_compress_default(p, d, bytes.Length, dest.Length);
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
2023-02-27 22:18:10 +00:00
|
|
|
|
// var vvv = new string((sbyte*)v);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
2023-02-27 22:18:10 +00:00
|
|
|
|
// Console.WriteLine(vvv);
|
2023-02-26 18:31:44 +00:00
|
|
|
|
|
|
|
|
|
}
|