RxDict
Introduction
Even before starting my "vibe coding" journey, I worked extensively with database generation in MDict (.mdx) format.
- MDict, created by Rayman Zhang, made it feasible to convert custom spreadsheets into readily searchable, offline dictionary apps.
- I initially assumed .mdx was an open standard.
- However, because its compression algorithms and encryption technologies were proprietary and undocumented initially, third-party dictionary engines (such as GoldenDict) had to reverse-engineer the .mdx format.
To make matters worse, the .mdx format suffered from severe version backward-incompatibility.
- As MDict evolved across versions (from v1.0 to v2.0 and v3.0), fundamental changes were introduced to header structures, block compression algorithms (e.g., LZO vs. zlib/zip), keyword index layouts, and encryption key derivations.
- Older dictionary readers frequently failed to open newer .mdx files, while newer tools struggled to parse legacy dictionaries without specific backward-compatibility shims.
Years of non-standardized specs and breaking version changes made reading and writing .mdx databases unusually complex and fragile.
- To bypass these constraints, I chose SQLite (.db) and indexed JSON as modern, standardized alternatives that guarantee backward compatibility and cross-platform longevity.
Features
RxDict operates as both a database compiler and an offline dictionary reader. It compiles Excel (.xlsx, .xls) and CSV files into indexed SQLite (.db) binaries via WebAssembly (WASM) or array-based JSON documents.
- 100% Local & Privacy-First: Unlike cloud-based workflows requiring Google Sheets synchronization, RxDict processes files entirely client-side within the browser. Sensitive internal documents and proprietary clinical data never leave your device.
- Storage & Persistence: Generated .db binaries and JSON structures are stored directly in browser IndexedDB as Blobs for instant local retrieval. These lightweight database binaries can also easily be exported and shared across devices or sent to colleagues for instant import into RxDict.
- High Efficiency via B-Tree Indexing: Moving away from unindexed JSON or pure Key-Value IndexedDB lookups, RxDict leverages SQLite’s indexed B-Tree search algorithm (SELECT id, word FROM entries). This delivers sub-millisecond lookup times with linear performance that does not degrade or inflate RAM consumption as dictionary entries scale into the hundreds of thousands.
Summary
RxDict serves as an advanced database creator and offline dictionary engine alongside RxIDB, together delivering a robust, 100% offline reference experience.
- While RxIDB synchronizes remotely via the Google Sheets API (Google Visualization API) into native browser IndexedDB keyword indexes, RxDict focuses on 100% local, privacy-first processing of .xlsx, .xls, and .csv files via client-side compilation.
- By leveraging SQLite WebAssembly (.db) and JSON document arrays, RxDict delivers sub-millisecond B-Tree search performance across large dictionaries while offering single-click file export and sharing.
Comments
Post a Comment