45 static_assert(
sizeof(
Wdb2Header) == 48 && std::is_trivially_copyable_v<Wdb2Header>);
The owning byte buffer file contents are read into.
The decode target: the codecs build the record vector through this, one field at a time.
The encode source: the codecs read the record vector through this.
The type-erased boundary between the templated Table<Record> facade (table.hpp) and the per-format co...
The error-handling vocabulary: ErrorCode, Error and the Result<T> alias every fallible wowlib operati...
FourCC chunk identifiers: compile-time conversion of the four-letter codes to the host integers chunk...
constexpr std::size_t Wdb2IndexEntryBytes
The per-id index block entry stride when maxId != 0: int32 indices[maxId - minId + 1] followed by int...
constexpr std::uint32_t Wdb2Magic
The WDB2 magic as memcpy'd off the file front (the bytes "WDB2").
Result< FileBuffer > writeWdb2(const TableInfo &info, const RecordSource &source, const TableState &state)
Encode a WDB2 image; header identity and the verbatim index/copy blocks are re-emitted.
Result< void > readWdb2(const TableInfo &info, std::span< const std::byte > data, RecordSink &sink, TableState &state)
Decode a WDB2 image: header, optional id-index block, fixed-stride records, string block,...
std::expected< T, Error > Result
Every fallible wowlib operation returns Result<T>; bindings translate the error branch into a target-...
The per-table identity a codec needs beyond the record data: the client version (format selection,...
The preserved decode state a table carries between read() and write() so a WDBC/WDB2 write is byte-pe...