internal override ByteWindow load(PackFile pack, long offset) { if (pack.beginWindowCache()) { _openFiles.incrementAndGet(); } try { if (_memoryMap) { return(pack.MemoryMappedByteWindow(offset, _windowSize)); } return(pack.Read(offset, _windowSize)); } catch (Exception) { Close(pack); throw; } }
internal override ByteWindow load(PackFile pack, long offset) { if (pack.beginWindowCache()) { int c = _openFiles.get(); _openFiles.compareAndSet(c, c + 1); } try { if (_memoryMap) { return(pack.MemoryMappedByteWindow(offset, _windowSize)); } return(pack.Read(offset, _windowSize)); } catch (Exception) { Close(pack); throw; } }