wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
codec_common.cpp File Reference

Shared fixed-stride codec internals (codec_detail.hpp): the byte-perfect string pool and the schema-driven inline field decode/encode used by the WDBC and WDB2 codecs. More...

#include <wowlib/db/codec_detail.hpp>
#include <bit>
#include <cstring>
Include dependency graph for codec_common.cpp:

Go to the source code of this file.

Namespaces

namespace  wowlib
namespace  wowlib::db
namespace  wowlib::db::detail

Functions

std::int64_t wowlib::db::detail::readInt (std::span< const std::byte > image, std::size_t &pos, std::size_t bytes, bool isSigned)
 Read a little-endian integer of bytes bytes at pos, sign-extended when isSigned, advancing pos.
void wowlib::db::detail::writeInt (FileBuffer &out, std::int64_t value, std::size_t bytes)
 Append value's low bytes bytes (little-endian) to out.
void wowlib::db::detail::decodeInlineRecord (std::span< const Column > schema, std::size_t record, std::span< const std::byte > image, RecordSink &sink, TableState &state)
 Decode one fixed-stride record's inline fields into sink and journal its string offsets (record then schema then element order).
void wowlib::db::detail::encodeInlineRecord (std::span< const Column > schema, const RecordSource &source, std::size_t record, FileBuffer &out, StringPool &pool, const TableState &state, std::size_t &cursor)
 Encode one fixed-stride record's inline fields from source, appending to out and resolving strings through pool (cursor tracks the journal).

Detailed Description

Shared fixed-stride codec internals (codec_detail.hpp): the byte-perfect string pool and the schema-driven inline field decode/encode used by the WDBC and WDB2 codecs.

Definition in file codec_common.cpp.