# SegmentBuilder.CalculateAppendSize(ReadOnlySpan&lt;byte&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.segmentbuilder/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming/orleans.providers.streams.common.segmentbuilder/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Streaming/Common/SegmentBuilder.cs#L16)

```csharp
public static int CalculateAppendSize(ReadOnlySpan<byte> memory)
```

Calculates how much space will be needed to append the provided bytes into the segment.

### Parameters

- `memory` (`ReadOnlySpan<byte>`)
