A .Net wrapper for CRoaring - a C implementation of RoaringBitmap.
using (var rb1 = new RoaringBitmap())
using (var rb2 = new RoaringBitmap())
{
rb1.AddMany(1, 2, 3, 4, 5, 100, 1000);
rb1.Optimize();
rb2.AddMany(3, 4, 5, 7, 50);
rb2.Optimize();
using (var result = rb1.And(rb2))
{
Console.WriteLine(result.Contains(2));
Console.WriteLine(result.Contains(4));
Console.WriteLine(result.Contains(5));
}
}
- CRoaring is a C/C++ dummy project whose whole responsibility is to trigger VCpkg to build the CRoaring native library.
- CRoaring.Net is a .Net Core 8 project that wraps the native library using P/Invoke which works on Linux and Windows.
- It will copy the binaries out of the native VCpkg project folder as content assets into its own output directory.
Requirements:
Run the build.sh
script
Requirements:
- VS2022 or later
- VCpkg and please do
vcpkg integrate install
. (CMake for CRoaring will be handled by VCpkg on your behalf.)
Build the CRoaring and CRoaring.Net projects.
Run the test.sh
or test.bat
scripts.