docs.rs failed to build honzo-c-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Honzo
The "ideal" ebook format.
Honzo is a binary ebook format designed for simplicity, performance, and portability. Zero-copy parsing, pull-based streaming, per-chunk compression, and portable annotations that travel with the file.
Features
| Feature | Description |
|---|---|
| Zero-copy parsing | Read without allocating. Embeddable on bare metal. |
| Pull-based streaming | Decompress chapters on demand. Never hold the whole book in memory. |
| Per-chunk compression | LZ4 per chapter via TOC flag. Images and fonts store raw. |
| Separately editable tail | META is last. Edit title, tags, revision without touching DATA. |
| Portable annotations | Highlights, bookmarks, notes stored in the file via EXTRA section. |
| Search index | Inverted term index as SIDX chunk (MessagePack). |
| Encryption envelope | AES-256-GCM per-chunk encryption with X25519 ECDH key exchange. |
| Multi-language metadata | Titles and descriptions localized per BCP 47 language tag. |
| Format conversion | Import from EPUB, MOBI, PDF; embedded WASM converter for browsers. |
Quick Start
Rust
use HonzoParser;
use ;
// Zero-copy parse
let data = read.unwrap;
let p = new.unwrap;
println!;
for entry in p.toc_entries
// Streaming read
let file = open.unwrap;
let mut stream = open.unwrap;
for chapter in stream.chapters
// Build
let hzo = new
.add_chunk
.finalize
.unwrap;
TypeScript
import { createReader, buildHonzo } from '@nisoku/honzo';
const response = await fetch('book.hzo');
const buf = new Uint8Array(await response.arrayBuffer());
const reader = await createReader(buf);
console.log(reader.chunkCount, reader.layoutMode);
const meta = reader.getMeta();
console.log(meta.title?.en);
C
HonzoHandle* handle = ;
uint32_t count = ;
Repository Layout
Honzo/
Cargo.toml # Rust workspace root
honzo.ksy # Kaitai Struct binary spec
Build/
crates/
honzo-core/ # no_std wire-format parser
honzo-chunks/ # Chunk types, validation, search index
honzo-io/ # Builder, reader, stream, DRM (std)
honzo-convert/ # EPUB/MOBI/PDF/CBZ import
honzo-c/ # C FFI bindings (Diplomat)
honzo-wasm/ # WASM bindings
honzo-cli/ # CLI binary
honzo-fixtures/ # Test fixture generator
adapters/typescript/ # npm @nisoku/honzo
Demo/ # Vite web demo (reader, maker, inspect, convert)
Docs/ # Documentation site (docmd)
Tests/ # Integration tests
Documentation
Packages
| Language | Package | Links |
|---|---|---|
| Rust (core) | honzo-core |
crates.io |
| Rust (chunks) | honzo-chunks |
crates.io |
| Rust (io) | honzo-io |
crates.io |
| Rust (convert) | honzo-convert |
crates.io |
| Rust (CLI) | honzo-cli |
crates.io |
| TypeScript / WASM | @nisoku/honzo |
npm |
| C | honzo-c |
Source in Build/crates/honzo-c |
Contributing
See CONTRIBUTING.md.
License
Apache License 2.0. See LICENSE.