This commit is contained in:
jpirnay
2026-03-21 20:04:03 +01:00
parent beeea38721
commit 5b710e960f
2 changed files with 470 additions and 403 deletions
+3 -3
View File
@@ -12,9 +12,9 @@
* - CrossPoint stores reading position as chapter/page.
* - KOReader sync uses XPath + percentage.
*
* This utility reparses exactly one spine XHTML item with Expat and builds
* transient text anchors (<xpath, textOffset>) so we can translate in both
* directions without keeping a full DOM in memory.
* This utility reparses exactly one spine XHTML item with Expat to translate
* between the two formats. It streams through the parse using O(1) memory
* (no anchor list), so it handles arbitrarily large chapters without OOM.
*
* Design constraints (ESP32-C3):
* - No persistent full-book structures.