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

    小蔥技能7w4.net有更新,你可以訪問看下。

  • 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
  • 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