public override void Write(byte[] buffer, int offset, int count)
{
Debug.Assert(!_parser._asyncWrite);
ValidateWriteParameters(buffer, offset, count);
StripPreamble(buffer, ref offset, ref count);
if (count > 0)
{
_parser.WriteInt(count, _stateObj); // write length of chunk
_stateObj.WriteByteArray(buffer, count, offset);
}
}