📦 Text Compressor — 文本压缩器
v1.0.0使用智能缩写和空白规范化压缩与解压缩文本文件。当用户要求压缩、缩小、减少或优化文本文件时使用。
0· 0·0 当前·0 累计
运行时依赖
无特殊依赖
安装命令
点击复制官方npx clawhub@latest install text-compressor
镜像加速npx clawhub@latest install text-compressor --registry https://cn.longxiaskill.com
技能文档
文本压缩器技能 使用可配置的缩写级别压缩文本文件,同时保持内容可读。
用法 基础压缩 python scripts/compress.py [output_file] [--level 1-3]
解压(近似还原) python scripts/compress.py [output_file] --decompress [--level 1-3]
级别 Level 1 — 清理空白、统一换行,保留全部词汇 Level 2 — + 智能短语缩写(that is → that's,you are → ur 等) Level 3 — + 激进缩写(because → bc,through → thru 等)
示例 compress.py report.txt — 压缩 report.txt → report.txt.compressed compress.py input.txt output.txt --level 2 — 指定输出并采用中等压缩 compress.py compressed.txt --decompress — 尝试还原(仅近似)
输出 显示节省字节数与压缩百分比。
注意 压缩默认单向。使用 --decompress 可尝试近似还原。 Level 1 对所有内容安全;更高级别可能影响可读性。 始终保留换行结构。