| 502 | } |
| 503 | |
| 504 | std::unique_ptr<Stream> PakFile::OpenFile(std::uint64_t hashedPath, std::int32_t bufferSize) |
| 505 | { |
| 506 | DEATH_ASSERT(_useHashIndex, "Hashed path can only be used with hash-indexed .pak files", nullptr); |
| 507 | |
| 508 | Item* foundItem = FindItemByHash(hashedPath); |
| 509 | if DEATH_UNLIKELY(foundItem == nullptr || (foundItem->Flags & ItemFlags::Directory) == ItemFlags::Directory) { |
| 510 | return nullptr; |
| 511 | } |
| 512 | |
| 513 | PakPreferredCompression compression = PakPreferredCompression(std::uint32_t(foundItem->Flags & ItemFlags::CompressionFlags) >> CompressionFlagsShift); |
| 514 | switch (compression) { |
no test coverage detected