|
wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
|
The preserved decode state a table carries between read() and write() so a WDBC/WDB2 write is byte-perfect and a WDC write reproduces the original compression. More...
#include <wowlib/db/codec.hpp>
Public Member Functions | |
| void | reset () |
| Reset the per-read state before decoding a fresh image. | |
Public Attributes | |
| std::uint32_t | sourceMagic = 0 |
| The magic read() sniffed; 0 for a fresh table. | |
| std::uint32_t | fieldCount = 0 |
| Preserved header fieldCount (not always derivable). | |
| std::uint32_t | recordSize = 0 |
| Preserved header recordSize. | |
| formats::StringBlock | strings |
| Preserved string block; offsets never move. | |
| std::vector< std::uint32_t > | stringOffsets |
| The original string-block offset of every string field, row-major in record then schema order — the byte-perfect write-back journal. | |
| std::vector< std::byte > | wdb2Header |
| Preserved WDB2 header identity bytes. | |
| std::vector< std::byte > | wdb2Index |
| Preserved WDB2 id-index block, verbatim. | |
| std::vector< std::byte > | wdb2Copy |
| Preserved WDB2 copy table, verbatim. | |
| std::vector< EncryptedSection > | encrypted |
| Encrypted WDC sections skipped on read. | |
| std::uint32_t | wdcTableHash = 0 |
| Preserved WDC3 header tableHash. | |
| std::uint32_t | wdcLayoutHash = 0 |
| Preserved WDC3 header layoutHash. | |
| std::uint32_t | wdcLocale = 0 |
| Preserved WDC3 header locale. | |
| std::vector< std::byte > | wdcOriginal |
| Raw image kept when the file has encrypted sections. | |
| std::vector< std::uint8_t > | wdcKinds |
| Original per-inline-column compression (WdcCompression). | |
| std::vector< std::byte > | wdc5Prefix |
| Preserved WDC5 {version, schema string} header prefix. | |
The preserved decode state a table carries between read() and write() so a WDBC/WDB2 write is byte-perfect and a WDC write reproduces the original compression.
Non-templated: owned by the facade, filled and read by the codecs.
|
inline |
Reset the per-read state before decoding a fresh image.
Definition at line 91 of file codec.hpp.
References encrypted, stringOffsets, strings, wdb2Copy, wdb2Header, wdb2Index, wdc5Prefix, wdcKinds, and wdcOriginal.
Referenced by wowlib::db::readWdb2(), wowlib::db::readWdbc(), and wowlib::db::wdc::readWdc().
| std::vector<EncryptedSection> wowlib::db::TableState::encrypted |
Encrypted WDC sections skipped on read.
Definition at line 82 of file codec.hpp.
Referenced by wowlib::db::wdc::readWdc(), reset(), and wowlib::db::wdc::writeWdc().
| std::uint32_t wowlib::db::TableState::fieldCount = 0 |
Preserved header fieldCount (not always derivable).
Definition at line 70 of file codec.hpp.
Referenced by wowlib::db::readWdb2(), wowlib::db::readWdbc(), wowlib::db::writeWdb2(), and wowlib::db::writeWdbc().
| std::uint32_t wowlib::db::TableState::recordSize = 0 |
Preserved header recordSize.
Definition at line 71 of file codec.hpp.
Referenced by wowlib::db::readWdb2(), wowlib::db::readWdbc(), wowlib::db::writeWdb2(), and wowlib::db::writeWdbc().
| std::uint32_t wowlib::db::TableState::sourceMagic = 0 |
The magic read() sniffed; 0 for a fresh table.
Definition at line 69 of file codec.hpp.
Referenced by wowlib::db::readWdb2(), wowlib::db::readWdbc(), wowlib::db::wdc::readWdc(), wowlib::db::writeWdb2(), and wowlib::db::writeWdbc().
| std::vector<std::uint32_t> wowlib::db::TableState::stringOffsets |
The original string-block offset of every string field, row-major in record then schema order — the byte-perfect write-back journal.
Definition at line 76 of file codec.hpp.
Referenced by wowlib::db::detail::decodeInlineRecord(), wowlib::db::detail::encodeInlineRecord(), wowlib::db::readWdb2(), wowlib::db::readWdbc(), and reset().
| formats::StringBlock wowlib::db::TableState::strings |
Preserved string block; offsets never move.
Definition at line 72 of file codec.hpp.
Referenced by wowlib::db::detail::decodeInlineRecord(), wowlib::db::readWdb2(), wowlib::db::readWdbc(), reset(), wowlib::db::writeWdb2(), and wowlib::db::writeWdbc().
| std::vector<std::byte> wowlib::db::TableState::wdb2Copy |
Preserved WDB2 copy table, verbatim.
Definition at line 80 of file codec.hpp.
Referenced by wowlib::db::readWdb2(), reset(), and wowlib::db::writeWdb2().
| std::vector<std::byte> wowlib::db::TableState::wdb2Header |
Preserved WDB2 header identity bytes.
Definition at line 78 of file codec.hpp.
Referenced by wowlib::db::readWdb2(), reset(), and wowlib::db::writeWdb2().
| std::vector<std::byte> wowlib::db::TableState::wdb2Index |
Preserved WDB2 id-index block, verbatim.
Definition at line 79 of file codec.hpp.
Referenced by wowlib::db::readWdb2(), reset(), and wowlib::db::writeWdb2().
| std::vector<std::byte> wowlib::db::TableState::wdc5Prefix |
Preserved WDC5 {version, schema string} header prefix.
Definition at line 88 of file codec.hpp.
Referenced by wowlib::db::wdc::readWdc(), and reset().
| std::vector<std::uint8_t> wowlib::db::TableState::wdcKinds |
Original per-inline-column compression (WdcCompression).
Definition at line 87 of file codec.hpp.
Referenced by wowlib::db::wdc::readWdc(), and reset().
| std::uint32_t wowlib::db::TableState::wdcLayoutHash = 0 |
Preserved WDC3 header layoutHash.
Definition at line 84 of file codec.hpp.
Referenced by wowlib::db::wdc::readWdc().
| std::uint32_t wowlib::db::TableState::wdcLocale = 0 |
Preserved WDC3 header locale.
Definition at line 85 of file codec.hpp.
Referenced by wowlib::db::wdc::readWdc().
| std::vector<std::byte> wowlib::db::TableState::wdcOriginal |
Raw image kept when the file has encrypted sections.
Definition at line 86 of file codec.hpp.
Referenced by wowlib::db::wdc::readWdc(), reset(), and wowlib::db::wdc::writeWdc().
| std::uint32_t wowlib::db::TableState::wdcTableHash = 0 |
Preserved WDC3 header tableHash.
Definition at line 83 of file codec.hpp.
Referenced by wowlib::db::wdc::readWdc().