22#include <vrs/ForwardDefinitions.h>
23#include <vrs/StreamId.h>
24#include <vrs/VrsExport.h>
25#include <vrs/helpers/EnumTemplates.hpp>
26#include <vrs/helpers/IOVector.h>
34class DirectWriteRecordData;
92 enum class Type : uint8_t {
110 uint32_t formatVersion,
112 uint64_t creationOrder);
115 void addDirectWriteRecordData(unique_ptr<DirectWriteRecordData>&& directWriteRecordData);
120 bool shouldTryToCompress()
const;
125 uint32_t compressRecord(
Compressor& compressor);
132 uint32_t& inOutRecordSize,
134 uint32_t compressedSize);
141 uint64_t getCreationOrder()
const {
142 return creationOrder_;
147 return usedBufferSize_;
156 static const char* typeName(Type type);
167 uint32_t formatVersion_{};
168 helpers::IOVector<uint8_t> buffer_;
169 size_t usedBufferSize_{};
170 uint64_t creationOrder_{};
171 unique_ptr<DirectWriteRecordData> directWriteRecordData_;
173 RecordManager& recordManager_;
Helper class to compress data using lz4 or zstd presets.
Definition Compressor.h:83
A class referencing data to be captured in a record at creation.
Definition DataSource.h:153
Essential VRS class holding a record's details and payload in memory during creation.
Definition Record.h:83
Type getRecordType() const
Get the record's record type.
Definition Record.h:151
Type
Definition Record.h:92
double getTimestamp() const
Get the record's timestamp.
Definition Record.h:137
static const double kMaxTimestamp
Maximum timestamp for a record.
Definition Record.h:86
size_t getSize() const
Get the record's payload size, uncompressed.
Definition Record.h:146
VRS internal class to manage the records of a specific Recordable after their creation.
Definition RecordManager.h:39
VRS stream identifier class.
Definition StreamId.h:251
The WriteFileHandler interface adds write operations to the FileHandler interface.
Definition WriteFileHandler.h:43
Definition Compressor.cpp:113
@ UNDEFINED
Unknown/unspecified.
CompressionType
Type of compression. Used in VRS record headers, so never modify the values.
Definition Record.h:39