Skip to main content

mdict_rs/
lib.rs

1//! Clean-room, library-first parser for MDict `.mdx` and `.mdd` dictionaries.
2//!
3//! The implementation is intentionally defensive:
4//! - all binary parsing goes through checked readers
5//! - compressed blocks are checksum-verified and size-limited
6//! - unsupported features fail with structured errors instead of panicking
7//! - parsing logic is shared between MDX and MDD wrappers
8
9#![forbid(unsafe_code)]
10
11mod core;
12
13pub mod checksum;
14pub mod compression;
15pub mod crypto;
16pub mod cursor;
17pub mod encoding;
18pub mod error;
19pub mod header;
20pub mod key_index;
21pub mod limits;
22pub mod mdd;
23pub mod mdx;
24pub mod record_index;
25pub mod source;
26pub mod types;
27
28pub use error::{Error, Result};
29pub use mdd::{
30    MddEntryIter, MddFile, MddKeyIter, MddOrdinalKey, MddOrdinalKeyIter, MddResource,
31    MddResourceSpan,
32};
33pub use mdx::{MdxEntryIter, MdxFile, MdxKeyIter, MdxOrdinalKey, MdxOrdinalKeyIter, MdxRecord};
34pub use types::{ContainerKind, EncryptionMode, Header, KeyOrdinal, OpenOptions, Passcode};