mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-19 02:20:12 +01:00
24 lines
463 B
C#
24 lines
463 B
C#
namespace ServicePoint;
|
|
|
|
public sealed partial class BitVec
|
|
{
|
|
public static BitVec Load(ReadOnlySpan<byte> bytes)
|
|
{
|
|
unsafe
|
|
{
|
|
fixed (byte* bytesPtr = bytes)
|
|
{
|
|
return Load(bytesPtr, (nuint)bytes.Length);
|
|
}
|
|
}
|
|
}
|
|
|
|
public bool this[nuint index]
|
|
{
|
|
get => Get(index);
|
|
set => Set(index, value);
|
|
}
|
|
|
|
public Span<byte> Data => UnsafeDataRef().AsSpan();
|
|
}
|