write the compressed data catalog. If closingFile is set to true, checksum is calculated
1018 uint32_t sizeWritten = 0;
1021 for (uint32_t j=0;j<
_catalog[
i].size();j++)
1024 int8_t swappedEntry[16];
1025 swappedEntry[0] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].first)[7];
1026 swappedEntry[1] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].first)[6];
1027 swappedEntry[2] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].first)[5];
1028 swappedEntry[3] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].first)[4];
1029 swappedEntry[4] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].first)[3];
1030 swappedEntry[5] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].first)[2];
1031 swappedEntry[6] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].first)[1];
1032 swappedEntry[7] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].first)[0];
1034 swappedEntry[8] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].second)[7];
1035 swappedEntry[9] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].second)[6];
1036 swappedEntry[10] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].second)[5];
1037 swappedEntry[11] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].second)[4];
1038 swappedEntry[12] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].second)[3];
1039 swappedEntry[13] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].second)[2];
1040 swappedEntry[14] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].second)[1];
1041 swappedEntry[15] =
reinterpret_cast<int8_t*
>(&
_catalog[
i][j].second)[0];
1044 _checksum.
add(reinterpret_cast<char*>(swappedEntry), 16);
1046 _file.write(reinterpret_cast<char*>(&swappedEntry[0]), 2*
sizeof(int64_t));
1047 sizeWritten += 2*
sizeof(int64_t);
1056 if (sizeWritten % 2880 != 0)
1058 vector<char> nullVec(2880 - sizeWritten%2880, 0);
1059 _file.write(nullVec.data(), 2880 - sizeWritten%2880);
CatalogType _catalog
Catalog, i.e. the main table that points to the compressed data.
fstream _file
The actual file streamer for accessing disk data.
Checksum _checksum
Checksum for asserting the consistency of the data.
bool add(const char *buf, size_t len, bool big_endian=true)