namespace ScreenConnect; public class CountingStream : WriteOnlyStream { private long length; public override long Length => length; public override void Write(byte[] buffer, int offset, int count) { length += count; } public override void Flush() { } }