Libbbf: Bound Book Format, A high-performance container for comics and manga

https://news.ycombinator.com/rss Hits: 2
Summary

libbbf: Bound Book Format Warning Official Source Notice: Please only download releases from this repository (ef1500/libbbf). External mirrors or forks may contain malware. 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. Getting Started Prerequisites C++17 compliant compiler (GCC/Clang/MSVC), and optionally CMake xxHash library Compilation CMake cmake -B build cmake --build build sudo cmake --install build Manual Linux g++ -std=c++17 bbfenc.cpp libbbf.cpp xxhash.c -o bbfmux -pthread Windows g++ -std=c++17 bbfenc.cpp libbbf.cpp xxhash.c -o bbfmux -municode Alternatively, if you need python support, use libbbf-python. Technical Details 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. Zero-Copy Architecture 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. High-Speed Parallel Verification 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. 4KB Alignment 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. Binary Layout Header (13 bytes): Magic BBF1 , versioning, and initial padding. Page Data: The raw image payloads (AVIF, PNG, etc.), each padded to 4096-byte boundaries. String Pool: A deduplicated poo...

First seen: 2026-01-21 05:37

Last seen: 2026-01-21 06:38