public static WritingContext StartWriting(ref Span <byte> destination, Range range) { var payloadContext = ExtensionLength.StartWriting(ref destination); var vectorContext = ByteVector.StartVectorWriting(ref destination, range); return(new WritingContext(payloadContext, vectorContext)); }
public static CursorWritingContext StartWriting(MemoryCursor cursor, Range range) { var payloadContext = ExtensionLength.StartWriting(cursor); var vectorContext = ByteVector.StartVectorWriting(cursor, range); return(new CursorWritingContext(payloadContext, vectorContext)); }
public static ByteVector.CursorWritingContext StartWriting(MemoryCursor cursor, NamedGroup group) { group.WriteBytes(cursor); return(ByteVector.StartVectorWriting(cursor, 0..ushort.MaxValue)); }