Repository navigation
Commit b81580e
authored
chore(assets): jieba 词典 gzip 化 + 删未压缩 models-dev 目录(-7.4MB) (#22)
Two zero-cost APK size wins (~7.4MB) found by benchmarking against
taixu / OmniBot (docs/analysis-apk-size-vs-taixu-omnibot.md):
- models-dev-api.json (4.1MB): the app reads the .gzip copy first and
the plaintext file was only a gunzip-failure fallback — for a local
asset that means a corrupt APK, and the network refresh is the real
fallback. Asset, code fallback branch, and the update script's
plaintext output all removed. The catalog guard test now verifies the
gzip itself is readable and still carries the known-majority
providers instead of diffing two copies.
- jieba dictionaries (5.4MB → 2.1MB): jieba.dict.utf8 and hmm_model
are now gzipped in assets and gunzipped onto filesDir at extract
time; the native side keeps reading the plain file names, so
jieba_jni.cpp is untouched. DICT_VERSION stays at 1 — content is
unchanged and already-extracted copies remain valid.
Co-authored-by: tall-1997 <278631348+tall-1997@users.noreply.github.com>1 parent e6beebb commit b81580e
9 files changed
Lines changed: 44 additions & 349042 deletions
File tree
- scripts
- src/android/app/src
- main
- assets
- jieba
- java/com/openminis/app
- provider
- test/java/com/openminis/app/provider
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
This file was deleted.
Binary file not shown.
0 commit comments