Mdx
A rust library for encode/decode mdx format file
Install / Use
/learn @raymanzhang/MdxREADME
LibMdx - MDict Dictionary File Reader and Writer
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.
📚 Table of Contents
🚀 Features
Reading & Parsing
- ✅ 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
Writing & Building
- ✅ 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
Search & Indexing
- ✅ 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
Performance
- ✅ 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
📦 Installation
Add to your Cargo.toml:
[dependencies]
mdx = { version = "0.5.0", features = ["icu"] }
Feature Flags
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"] }
📜 License
MDictX is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See LICENSE for details.
👥 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📧 Contact
- Author: Rayman Zhang
- Email: raymanzhang@gmail.com
- Repository: https://github.com/raymanzhang/mdx
Last Updated: October 29, 2025 Version: 0.5.0
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
