(int index, ReadOnlySpan<byte> bytes)
| 378 | } |
| 379 | |
| 380 | [MethodImpl(MethodImplOptions.AggressiveInlining)] |
| 381 | public void SetBytes(int index, ReadOnlySpan<byte> bytes) |
| 382 | { |
| 383 | if (index < 0 || index + bytes.Length > _count) |
| 384 | { |
| 385 | throw new ArgumentOutOfRangeException(nameof(index)); |
| 386 | } |
| 387 | |
| 388 | bytes.CopyTo(_storage.AsSpan(index)); |
| 389 | } |
| 390 | |
| 391 | public byte[] ToArray() |
| 392 | { |