You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bound Book Format (.bbf) is a high-performance binary container designed specifically for digital comic books and manga. Unlike CBR/CBZ, BBF is built for DirectSotrage/mmap, easy integrity checks, and mixed-codec containerization.
Alternatively, if you need python support, use [libbbf-python](https://github.com/ef1500/libbbf-python).
28
+
29
29
---
30
30
31
31
## Technical Details
@@ -36,7 +36,7 @@ BBF is designed as a Footer-indexed binary format. This allows for rapid append-
36
36
The `bbfmux` reference implementation utilizes **Memory Mapping (mmap/MapViewOfFile)**. Instead of reading file data into intermediate buffers, the tool maps the container directly into the process address space. This allows the CPU to access image data at the speed of your NVMe drive's hardware limit.
37
37
38
38
### High-Speed Parallel Verification
39
-
Integrity checks now utilize **Parallel XXH3**. On multi-core systems, the verifier splits the asset table into chunks and validates multiple pages simultaneously. This makes BBF verification up to **10x faster** than ZIP/RAR CRC checks.
39
+
Integrity checks utilize **Parallel XXH3**. On multi-core systems, the verifier splits the asset table into chunks and validates multiple pages simultaneously. This makes BBF verification up to **10x faster** than ZIP/RAR CRC checks.
40
40
41
41
### 4KB Alignment
42
42
Every asset in a BBF file starts on a **4096-byte boundary**. This alignment is critical for modern hardware, allowing for DirectStorage transfers directly from disk to GPU memory, bypassing CPU bottlenecks entirely.
@@ -45,12 +45,14 @@ Every asset in a BBF file starts on a **4096-byte boundary**. This alignment is
45
45
### Binary Layout
46
46
1.**Header (13 bytes)**: Magic `BBF1`, versioning, and initial padding.
47
47
2.**Page Data**: The raw image payloads (AVIF, PNG, etc.), each padded to **4096-byte boundaries**.
48
-
3.**String Pool**: A deduplicated pool of null-terminated strings for metadata and section titles.
49
-
4.**Asset Table**: A registry of physical data blobs with XXH3 hashes.
50
-
5.**Page Table**: The logical reading order, mapping logical pages to assets.
51
-
6.**Section Table**: Markers for chapters, volumes, or gallery sections.
52
-
7.**Metadata Table**: Key-Value pairs for archival data (Author, Scanlation team, etc.).
53
-
8.**Footer (76 bytes)**: Table offsets and a final integrity hash.
48
+
4.**String Pool**: A deduplicated pool of null-terminated strings for metadata and section titles.
49
+
5.**Asset Table**: A registry of physical data blobs with XXH3 hashes.
50
+
6.**Page Table**: The logical reading order, mapping logical pages to assets.
51
+
7.**Section Table**: Markers for chapters, volumes, or gallery sections.
52
+
8.**Metadata Table**: Key-Value pairs for archival data (Author, Scanlation team, etc.).
53
+
9.**Footer (76 bytes)**: Table offsets and a final integrity hash.
54
+
55
+
NOTE: `libbbf.h` includes a `flags` field, as well as extra padding for each asset entry. This is so that in the future `libbbf` can accomodate future technical advancements in both readers and image storage.
54
56
55
57
### Feature Comparison: Digital Comic & Archival Formats
56
58
@@ -103,14 +105,14 @@ The included `bbfmux` tool is a reference implementation for creating and managi
103
105
The `bbfmux` utility provides a powerful interface for managing Bound Book files:
104
106
105
107
***Flexible Ingestion**: Create books by passing individual files, entire directories, or a mix of both.
106
-
***Logical Structuring**: Add named **Sections** (Chapters, Volumes, Galleries) to define the internal hierarchy of the book.
108
+
***Logical Structuring**: Add named **Sections** (Chapters, Volumes, Extras, Galleries) to define the internal hierarchy of the book.
107
109
***Custom Metadata**: Embed arbitrary Key:Value pairs into the global string pool for archival indexing.
108
110
***Content-Aware Extraction**: Extract the entire book or target specific sections by name.
109
111
110
112
## Usage Examples
111
113
112
114
### Create a new BBF
113
-
You can mix individual images and folders. `bbfmux` sorts inputs alphabetically, deduplicates identical assets, and aligns data to 4096-byte boundaries.
115
+
You can mix individual images and folders. `bbfmux` sorts inputs alphabetically, deduplicates identical assets, and aligns data to 4096-byte boundaries. See [Advanced CLI Usage](https://github.com/ef1500/libbbf?tab=readme-ov-file#advanced-cli-features) for how to specify your own custom page orders.
0 commit comments