/// <summary> /// Reads a byte from the file. /// </summary> /// <param name="index">the index of the byte to read</param> /// <returns>the byte</returns> public byte ReadByte(long index) { if (_writes.Contains(index)) { return(_writes[index]); } if (_fileStream.Position != index) { _fileStream.Position = index; } byte res = (byte)_fileStream.ReadByte(); return(res); }