Text Compressor

👤 fuzzyb33s 📦 v1.0.1 ⭐ 4.2 ⬇️ 624 下载
📄 办公效率 免费

📖 技能介绍


name: text-compressor description: Compress and decompress text files using smart abbreviation and whitespace normalization. Use when user asks to compress, shrink, reduce, or optimize text file size while preserving readability. Also use for batch text processing, file size reduction, or text cleanup.


Text Compressor Skill

Compress text files using configurable levels of text abbreviation while keeping content readable.

Usage

Basic Compression

python scripts/compress.py <input_file> [output_file] [--level 1-3]

Decompress (restore approximation)

python scripts/compress.py <input_file> [output_file] --decompress [--level 1-3]

Levels

  • Level 1 — Clean whitespace, normalize line breaks, preserve all words
  • Level 2 — + Smart phrase contractions (that is -> that's, you are -> ur, etc.)
  • Level 3 — + Aggressive abbreviations (because -> bc, through -> thru, etc.)

Examples

  • compress.py report.txt — compress report.txt → report.txt.compressed
  • compress.py input.txt output.txt --level 2 — medium compression to specific output

    小葱技能站7w4.net每天更新,海量AI技能等你发现。

  • compress.py compressed.txt --decompress — attempt to restore (approximate)

Output

Shows bytes saved and percentage reduction.

Notes

  • Compression is one-way by default. Use --decompress to attempt restoration (approximate only).
  • Level 1 is safe for all content. Higher levels may affect readability.
  • Always preserves line break structure.

🤖 AI 评测

这是一个实用的文本压缩工具,三级压缩策略设计合理,文档说明清晰。基础压缩功能实现得不错,但解压功能只能部分恢复原文,准确性有限;最高级别压缩会影响阅读体验,实用性打折扣。整体质量中上,基础功能扎实,细节打磨还需加强。适合对压缩率要求不高但需要保持基本可读性的场景使用。

📊 多维度评分

适应性4
规范性4.1
有效性4.3
可靠性4
可信度4.4

📁 包含文件 (6 个)

📄 SKILL.md 1.4 KB
📄 _meta.json 134 B
📄 pack.py 139 B
📄 package_manual.py 1.1 KB
📄 scripts/compress.py 6.6 KB
📄 test.txt 144 B