public override void WriteByte()

in src/RecyclableMemoryStream.cs [1098:1133]


        public override void WriteByte(byte value)
        {
            this.CheckDisposed();

            long end = (long)this.position + 1;

            if (this.largeBuffer == null)
            {
                var blockSize = this.memoryManager.BlockSize;

                var block = (int)(this.position / blockSize);

                if (block >= this.blocks.Count)
                {
                    this.EnsureCapacity(end);
                }

                this.blocks[block][this.position % blockSize] = value;
            }
            else
            {
                if (this.position >= this.largeBuffer.Length)
                {
                    this.EnsureCapacity(end);
                }

                this.largeBuffer[this.position] = value;
            }

            this.position = end;

            if (this.position > this.length)
            {
                this.length = this.position;
            }
        }