/// <summary>
 /// Reads memory buffer from the stream.
 /// </summary>
 /// <param name="length">Number of bytes to read from the stream.</param>
 /// <returns>Memory buffer read from the stream.</returns>
 public MemoryBuffer ReadBuffer(uint length)
 {
     if (blockRemaining < length)
     {
         blockRemaining -= length;
         position       += length;
         return(BaseReader.ReadBuffer(length));
     }
     return(new MemoryBuffer(this.ReadByteArray((int)length)));
 }