tibet_zip_core/lib.rs
1//! tbz-core: Block format, TIBET envelope, and zstd frame handling
2//!
3//! This crate defines the TBZ wire format — per-block authenticated
4//! compression built on zstd frames with TIBET provenance.
5
6pub mod block;
7pub mod envelope;
8pub mod manifest;
9pub mod signature;
10pub mod stream;
11
12/// TBZ magic bytes: 0x54425A (ASCII "TBZ")
13pub const MAGIC: [u8; 3] = [0x54, 0x42, 0x5A];
14
15/// Current TBZ format version
16pub const VERSION: u8 = 1;
17
18/// Block types
19#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
20#[repr(u8)]
21pub enum BlockType {
22 /// Block 0: archive manifest (always JIS level 0)
23 Manifest = 0,
24 /// Data block with compressed payload
25 Data = 1,
26 /// Nested TBZ archive (TBZ-deep / matroesjka)
27 Nested = 2,
28}
29
30/// JIS authorization level for a block
31pub type JisLevel = u8;
32
33// Re-export ed25519 types for consumers
34pub use ed25519_dalek::{SigningKey, VerifyingKey};