14 bhead.
old =
reinterpret_cast<const void *
>(uintptr_t(bhead4.
old));
22 if constexpr (
sizeof(
void *) == 8) {
23 return reinterpret_cast<const void *
>(
ptr);
34 bhead.
len = small_bhead8.
len;
37 bhead.
nr = small_bhead8.
nr;
45 bhead.
len = large_bhead8.
len;
48 bhead.
nr = large_bhead8.
nr;
61 const int64_t readsize = file->
read(file, &bhead4,
sizeof(bhead4));
70 const int64_t readsize = file->
read(file, &small_bhead8,
sizeof(small_bhead8));
79 const int64_t readsize = file->
read(file, &large_bhead8,
sizeof(large_bhead8));
Wrapper for reading from various sources (e.g. raw files, compressed files, memory....
uint32_t uint32_from_uint64_ptr(uint64_t ptr)
static BHead bhead_from_large_bhead8(const LargeBHead8 &large_bhead8)
static BHead bhead_from_small_bhead8(const SmallBHead8 &small_bhead8)
std::optional< BHead > BLO_readfile_read_bhead(FileReader *file, const BHeadType type)
static const void * old_ptr_from_uint64_ptr(const uint64_t ptr)
static BHead bhead_from_bhead4(const BHead4 &bhead4)
unsigned long long int uint64_t