* Read in and decompress the log metadata from a CompressedRecordEntry * * \param in * Character array to read the entry from * \param lastTimestamp * Timestamp of the previous entry dencoded before this one * \param[out] logid * The logId decoded * \param[out] timestamp * The timestamp decoded * \return * true indicat
| 546 | * encode a CompressedRecordEntry |
| 547 | */ |
| 548 | inline bool |
| 549 | decompressLogHeader(const char **in, uint64_t lastTimestamp, |
| 550 | uint32_t &logId, uint64_t ×tamp) { |
| 551 | if (!(reinterpret_cast<const UnknownHeader*>(*in)->entryType |
| 552 | == EntryType::LOG_MSGS_OR_DIC)) |
| 553 | return false; |
| 554 | |
| 555 | CompressedEntry cre; |
| 556 | memcpy(&cre, (*in), sizeof(CompressedEntry)); |
| 557 | (*in) += sizeof(CompressedEntry); |
| 558 | |
| 559 | logId = BufferUtils::unpack<uint32_t>(in, |
| 560 | static_cast<uint8_t>(cre.additionalFmtIdBytes + 1)); |
| 561 | timestamp = BufferUtils::unpack<int64_t>(in, |
| 562 | static_cast<uint8_t>(cre.additionalTimestampBytes)); |
| 563 | |
| 564 | timestamp += lastTimestamp; |
| 565 | |
| 566 | return true; |
| 567 | } |
| 568 | |
| 569 | |
| 570 | bool insertCheckpoint(char** out, |
no outgoing calls