249 const uint32_t one_catalog_row_size =
fTable.
num_cols*2*
sizeof(uint64_t);
250 const uint32_t total_catalog_size =
fNumTiles*one_catalog_row_size;
253 std::vector<char> swapped_catalog(total_catalog_size);
258 revcpy<sizeof(uint64_t)>(swapped_catalog.data() + shift, (
char*)(it->data()),
fTable.
num_cols*2);
259 shift += one_catalog_row_size;
263 memset(swapped_catalog.data()+shift, 0, total_catalog_size-shift);
270 const off_t where_are_we = tellp();
274 write(swapped_catalog.data(), total_catalog_size);
uint32_t fCatalogSize
Actual catalog size (.size() is slow on large lists)
Checksum fCatalogSum
Checksum of the catalog.
off_t fCatalogOffset
Offset of the catalog from the beginning of the file.
uint32_t fNumTiles
Number of pre-reserved tiles.
CatalogType fCatalog
Catalog for this file.
bool add(const char *buf, size_t len, bool big_endian=true)