docs: sync book.bin/section.bin version refs to source (#2169)

This commit is contained in:
Angad Kandhari
2026-05-29 03:07:57 -04:00
committed by GitHub
parent 75a35f0578
commit cc2079a578
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -898,7 +898,7 @@ rm -rf /path/to/sd/.crosspoint/epub_<hash>/sections/
**Current Versions** (as of docs/file-formats.md):
- `book.bin`: **Version 5** (metadata structure)
- `section.bin`: **Version 12** (layout structure)
- `section.bin`: **Version 24** (layout structure)
**Version Increment Rules**:
1. **ALWAYS increment version** BEFORE changing binary structure
@@ -908,7 +908,7 @@ rm -rf /path/to/sd/.crosspoint/epub_<hash>/sections/
**Example** (incrementing section format version):
```cpp
// lib/Epub/Epub/Section.cpp
static constexpr uint8_t SECTION_FILE_VERSION = 13; // Was 12, now 13
static constexpr uint8_t SECTION_FILE_VERSION = 25; // Was 24, now 25
// Add new field to structure
struct PageLine {
+3 -2
View File
@@ -2,7 +2,7 @@
## `book.bin`
### Version 3
### Version 5
ImHex Pattern:
@@ -12,7 +12,7 @@ import std.string;
import std.core;
// === Configuration ===
#define EXPECTED_VERSION 3
#define EXPECTED_VERSION 5
#define MAX_STRING_LENGTH 65535
// === String Structure ===
@@ -34,6 +34,7 @@ fn format_string(String s) {
struct Metadata {
String title [[comment("Book title")]];
String author [[comment("Book author")]];
String language [[comment("Book language code")]];
String coverItemHref [[comment("Path to cover image")]];
String textReferenceHref [[comment("Path to guided first text reference")]];
} [[comment("Book metadata information")]];