libmdx is a comprehensive Rust library for reading, writing, and converting MDict dictionary files (.mdx, .mdd, .zdb formats). It provides high-performance parsing, full-text search capabilities, multiple compression/encryption methods, and support for various dictionary formats.
- ✅ MDX Files: Parse MDict dictionary files with HTML/Text/Binary content
- ✅ MDD Files: Extract resources (images, audio, fonts) from resource files
- ✅ ZDB Files: Read optimized MDict database format
- ✅ Multiple Locales: Support for various character encodings and locales
- ✅ HTML Processing: Automatic link rewriting and resource resolution
- ✅ ZDB Creation: Build optimized dictionary databases
- ✅ Format Conversion: Convert between MDX, MDD, and other formats
- ✅ Custom Compression: Choose from multiple compression algorithms
- ✅ Encryption Support: Secure dictionaries with various encryption methods
- ✅ Full-Text Search: Build and query Tantivy-based search indexes
- ✅ Fuzzy Matching: Support for approximate keyword matching
- ✅ Locale-Aware: ICU collation for proper Unicode sorting
- ✅ Streaming I/O: Efficient memory usage for large files
- ✅ LRU Caching: Smart caching for frequently accessed blocks
- ✅ Parallel Processing: Multi-threaded operations support
- ✅ Optimized Indexing: Fast binary search for key lookups
Add to your Cargo.toml:
[dependencies]
mdx = { version = "0.5.0", features = ["icu"] }icu(default): Use ICU4X for Unicode collation (pure Rust, recommended)rust-icu: Use rust_icu for Unicode collation (requires system ICU library)
# Use rust_icu instead of icu
mdx = { version = "0.5.0", features = ["rust-icu"] }
# Both features can be enabled
mdx = { version = "0.5.0", features = ["icu", "rust-icu"] }MDictX is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Author: Rayman Zhang
- Email: raymanzhang@gmail.com
- Repository: https://github.com/raymanzhang/mdx
Last Updated: October 29, 2025 Version: 0.5.0