Skip to content

Commit bb03d86

Browse files
committed
Added some extra options, improved exporting.
1 parent 40ed4a0 commit bb03d86

2 files changed

Lines changed: 312 additions & 134 deletions

File tree

readme.md

Lines changed: 49 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,28 @@
55

66
![alt text](https://img.shields.io/badge/License-MIT-green.svg)
77

8-
Bound Book Format (.bbf) is a high-performance, archival-grade 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.
8+
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.
9+
10+
---
11+
12+
## Getting Started
13+
14+
### Prerequisites
15+
- C++17 compliant compiler (GCC/Clang/MSVC)
16+
- [xxHash](https://github.com/Cyan4973/xxHash) library
17+
18+
### Compilation
19+
Linux
20+
```bash
21+
g++ -std=c++17 bbfenc.cpp libbbf.cpp xxhash.c -o bbfmux
22+
```
23+
24+
Windows
25+
```bash
26+
g++ -std=c++17 bbfmux.cpp libbbf.cpp xxhash.c -o bbfmux -municode
27+
```
28+
29+
---
930

1031
## Technical Details
1132
BBF is designed as a Footer-indexed binary format. This allows for rapid append-only creation and immediate random access to any page without scanning the entire file.
@@ -81,61 +102,59 @@ The `bbfmux` utility provides a powerful interface for managing Bound Book files
81102
## Usage Examples
82103

83104
### Create a new BBF
84-
You can mix individual images and folders. `bbfmux` will sort inputs alphabetically, deduplicate identical assets, and align data to 4KB boundaries.
85-
86-
NOTE: It's not quite implemented yet in the CLI, but the `AssetTable` enables you to specify custom reading orders.
105+
You can mix individual images and folders. `bbfmux` sorts inputs alphabetically, deduplicates identical assets, and aligns data to 4096-byte boundaries.
87106

88107
```bash
108+
# Basic creation with metadata
89109
bbfmux cover.png ./chapter1/ endcard.png \
90-
--section="Cover":1 \
91-
--section="Chapter 1":2 \
92-
--section="Credits":24 \
93110
--meta=Title:"Akira" \
94111
--meta=Author:"Katsuhiro Otomo" \
112+
--meta=Tags:"[Action, Sci-Fi, Cyberpunk]" \
95113
akira.bbf
96114
```
97115

116+
### Hierarchical Sections (Volumes & Chapters)
117+
BBF supports nesting sections. By defining a Parent relationship, you can group chapters into volumes. This allows readers to display a nested Table of Contents and enables bulk-extraction of entire volumes.
118+
119+
**Syntax:** `--section="Name":Page[:ParentName]`
120+
121+
```bash
122+
# Create a book with nested chapters
123+
bbfmux ./manga_folder/ \
124+
--section="Volume 1":1 \
125+
--section="Chapter 1":1:"Volume 1" \
126+
--section="Chapter 2":20:"Volume 1" \
127+
--section="Volume 2":180 \
128+
--section="Chapter 3":180:"Volume 2" \
129+
manga.bbf
130+
```
131+
98132
### Verify Integrity
99-
Scan for bit-rot or data corruption. Will tell you which assets are corrupted.
133+
Scan the archive for bit-rot or data corruption. BBF uses **[XXH3_64](https://github.com/Cyan4973/xxHash)** hashes to verify every individual image payload.
100134
```bash
101135
bbfmux input.bbf --verify
102136
```
103137

104138
### Extract Data
105-
Extract a specific section or the entire book.
139+
Extract the entire book, a specific volume, or a single chapter. When extracting a parent section (like a Volume), `bbfmux` automatically includes all child chapters.
140+
141+
**Extract a specific section:**
106142
```bash
107-
bbfmux input.bbf --extract --section="Chapter 1" --outdir="./chapter1"
143+
bbfmux input.bbf --extract --section="Volume 1" --outdir="./Volume1"
108144
```
109145

110-
Extract the entire book
146+
**Extract the entire book:**
111147
```bash
112148
bbfmux input.bbf --extract --outdir="./unpacked_book"
113149
```
114150

115-
### View Metadata
116-
View the metadata for the .bbf file.
151+
### View Metadata & Structure
152+
View the version, page count, deduplication stats, hierarchical sections, and all embedded metadata.
117153
```bash
118154
bbfmux input.bbf --info
119155
```
120156

121157
---
122158

123-
## Getting Started
124-
125-
### Prerequisites
126-
- C++17 compliant compiler (GCC/Clang/MSVC)
127-
- [xxHash](https://github.com/Cyan4973/xxHash) library
128-
129-
### Compilation
130-
Linux
131-
```bash
132-
g++ -std=c++17 bbfenc.cpp libbbf.cpp xxhash.c -o bbfmux
133-
```
134-
135-
Windows
136-
```bash
137-
g++ -std=c++17 bbfmux.cpp libbbf.cpp xxhash.c -o bbfmux -municode
138-
```
139-
140159
## License
141160
Distributed under the MIT License. See `LICENSE` for more information.

0 commit comments

Comments
 (0)