<PackageReference Include="System.Text.Json" Version="7.0.2" />

PooledByteBufferWriter

public int Capacity { get; }

public int FreeCapacity { get; }

public int WrittenCount { get; }

public ReadOnlyMemory<byte> WrittenMemory { get; }

public PooledByteBufferWriter(int initialCapacity)

public void Advance(int count)

public void Clear()

public void ClearAndReturnBuffers()

public void Dispose()

public Memory<byte> GetMemory(int sizeHint = 0)

public Span<byte> GetSpan(int sizeHint = 0)

public void InitializeEmptyInstance(int initialCapacity)