2024-05-25 11:16:37 +02:00
|
|
|
namespace ServicePoint;
|
2024-05-13 00:17:40 +02:00
|
|
|
|
2024-10-19 14:21:50 +02:00
|
|
|
public sealed partial class BitVec
|
2024-05-13 00:17:40 +02:00
|
|
|
{
|
2024-10-20 13:31:41 +02:00
|
|
|
public static BitVec Load(ReadOnlySpan<byte> bytes)
|
2024-10-19 16:04:01 +02:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (byte* bytesPtr = bytes)
|
|
|
|
{
|
|
|
|
return Load(bytesPtr, (nuint)bytes.Length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-16 20:56:55 +02:00
|
|
|
public bool this[nuint index]
|
2024-05-13 00:17:40 +02:00
|
|
|
{
|
2024-10-19 14:21:50 +02:00
|
|
|
get => Get(index);
|
|
|
|
set => Set(index, value);
|
2024-05-13 00:17:40 +02:00
|
|
|
}
|
|
|
|
|
2024-10-19 14:21:50 +02:00
|
|
|
public Span<byte> Data => UnsafeDataRef().AsSpan();
|
2024-05-13 00:17:40 +02:00
|
|
|
}
|