A valid payload is consumed exactly, so reading past its end or leaving
bytes unread now fails the decode immediately instead of producing
garbage until the checksum check. Headers with an impossible tick count
for their payload size or a table larger than 2^24 are rejected before
any allocation. The fuzz test mutates header and payload bytes, sizes
and lengths and requires every accepted chunk to decode to the original
ticks. The format and encoder output are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hot path now reads Squash() from a precomputed table (byte-identical
output). The self-test encodes a deterministic data set and compares
size and FNV-1a hash with the reference C++ build, which catches any
MQL5 compiler difference that would make archives non-portable.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TkzExport writes the tick history of a symbol into a .tkz archive
(day/week/month chunks, optional per-chunk verification), TkzVerify
decodes an archive and compares it with the terminal history,
TkzToCustom loads an archive into a custom symbol, and TkzSelfTest runs
CTkzSelfTest (synthetic edge cases, real ticks, archive I/O). The
self-test class is also compiled and run by the C++ harness.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Make ternary branches and compound assignments type-exact for the MQL5
compiler, avoid names that clash with built-in functions (Symbol,
Digits), store min/max tick time per chunk for range queries, and let
CTkzWriter decode each chunk again and compare it with its input.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>