<PackageReference Include="Relativity.Server.Utility.SDK" Version="5000.2.1" />

kCura.Utility.Streaming.ByteLimitingReadStreamDecorator

Wraps a stream so that data can be read until a predefined number of bytes has been read. Does NOT dispose of the wrapped stream.
public ByteLimitingReadStreamDecorator(Stream stream, long maxByteSize)

Initializes a new instance of ByteLimitingReadStreamDecorator with the provided backing stream and maximum size.