Skip to content

Commit

Permalink
remove metadata size
Browse files Browse the repository at this point in the history
  • Loading branch information
davemarco committed Feb 5, 2025
1 parent a885dc8 commit fc00b4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 2 additions & 7 deletions components/core/src/clp/streaming_archive/ArchiveMetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,10 @@ void ArchiveMetadata::expand_time_range(epochtime_t begin_timestamp, epochtime_t
}
}

void ArchiveMetadata::write_to_file(FileWriter& file_writer) {
void ArchiveMetadata::write_to_file(FileWriter& file_writer) const {
std::ostringstream buf;
msgpack::pack(buf, *this);
auto const& string_buf = buf.str();

size_t previous_metadata_size = m_metadata_size;
m_metadata_size = string_buf.size();
file_writer.write(string_buf.data(), m_metadata_size);

m_compressed_size = m_compressed_size - previous_metadata_size + m_metadata_size;
file_writer.write(string_buf.data(), string_buf.size());
}
} // namespace clp::streaming_archive
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class ArchiveMetadata {
*
* @param file_writer
*/
void write_to_file(FileWriter& file_writer);
void write_to_file(FileWriter& file_writer) const;

MSGPACK_DEFINE_MAP(
MSGPACK_NVP("archive_format_version", m_archive_format_version),
Expand All @@ -128,7 +128,6 @@ class ArchiveMetadata {
uint64_t m_dynamic_uncompressed_size{0};
// The size of the archive
uint64_t m_compressed_size{0};
uint64_t m_metadata_size{0};
uint64_t m_dynamic_compressed_size{0};
};
} // namespace clp::streaming_archive
Expand Down

0 comments on commit fc00b4a

Please sign in to comment.