Open wraymo opened 3 weeks ago
The changes in this pull request focus on enhancing the functionality of the ArchiveWriter
and related classes, particularly in handling single-file archives. Key updates include the introduction of new member variables and methods, modifications to existing method signatures, and improvements to command line argument parsing. The TimestampDictionaryWriter
class has also been restructured to streamline its operations. Additionally, a new file defining structures for single-file archives has been added, along with updates to related classes and methods to support these enhancements.
File | Change Summary |
---|---|
components/core/src/clp_s/ArchiveWriter.cpp |
Added member variable m_single_file_archive , modified close method to differentiate between single and multi-file archives, added write_timestamp_dict method, updated store_tables return type to std::pair<size_t, size_t> . |
components/core/src/clp_s/ArchiveWriter.hpp |
Added bool single_file_archive to ArchiveWriterOption , updated store_tables return type, added methods for single-file archive handling. |
components/core/src/clp_s/CommandLineArguments.cpp |
Introduced single-file-archive option in command line argument parsing. |
components/core/src/clp_s/CommandLineArguments.hpp |
Added member variable m_single_file_archive and getter method get_single_file_archive() . |
components/core/src/clp_s/JsonParser.cpp |
Added single_file_archive to m_archive_options structure in constructor. |
components/core/src/clp_s/JsonParser.hpp |
Added bool single_file_archive to JsonParserOption struct. |
components/core/src/clp_s/SingleFileArchiveDefs.hpp |
Introduced definitions and structures for managing single-file archives, including ArchiveHeader , ArchiveCompressionType , and related structures. |
components/core/src/clp_s/TimestampDictionaryWriter.cpp |
Replaced write_and_flush_to_disk with write , added clear and size_in_bytes methods, removed open and close methods. |
components/core/src/clp_s/TimestampDictionaryWriter.hpp |
Updated constructor and method signatures, removed file management methods, added write , clear , and size_in_bytes methods. |
components/core/src/clp_s/archive_constants.hpp |
Added constant cArchiveFile for archive file path. |
components/core/src/clp_s/clp-s.cpp |
Modified compress function to include single_file_archive parameter. |
components/core/src/clp_s/TimestampEntry.hpp |
Added method size_in_bytes() to calculate size of TimestampEntry object. |
ArchiveWriter.cpp
and ArchiveWriter.hpp
regarding archive metadata handling and new writing methods relate to the overall archiving functionality.ArchiveReader
class align with changes in the ArchiveWriter
class, enhancing archive processing and structure.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Nice work! Seems mostly good for a draft implementation.
Main things we should change quickly is putting the archive header + metadata section into the regular multi-file archive, and also formally pick a magic number + change the magic number to 4 bytes.
There are other things we need to clean up/think about before actually merging this, but the above should changes should be enough to build off of for prototyping.
Also need to go through and fix all of the fields that are a different size than what the spec specifies.
Description
This PR adds support for writing clp-s single file archives in accordance with the SFA spec. This is accomplished by first compressing a multi-file archive as normal then combining everything together into a single archive.
Validation performed
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation
Refactor