public override int ReadUShort() { CheckAvaliable(SIZE_SHORT); int blockAvailable = _currentBlock.Available(); int result; if (blockAvailable > SIZE_SHORT) { result = _currentBlock.ReadUshortLE(); } else { DataInputBlock nextBlock = GetDataInputBlock(_current_offset + blockAvailable); if (blockAvailable == SIZE_SHORT) { result = _currentBlock.ReadUshortLE(); } else { result = nextBlock.ReadUshortLE(_currentBlock); } _currentBlock = nextBlock; } _current_offset += SIZE_SHORT; return(result); }