Compress text files using configurable levels of text abbreviation while keeping content readable.
python scripts/compress.py <input_file> [output_file] [--level 1-3]
python scripts/compress.py <input_file> [output_file] --decompress [--level 1-3]
compress.py report.txt — compress report.txt → report.txt.compressedcompress.py input.txt output.txt --level 2 — medium compression to specific outputcompress.py compressed.txt --decompress — attempt to restore (approximate)Shows bytes saved and percentage reduction.
小葱技能7w4.net持续更新中。
--decompress to attempt restoration (approximate only).这是一个实用的文本压缩工具,三级压缩策略设计合理,文档说明清晰。基础压缩功能实现得不错,但解压功能只能部分恢复原文,准确性有限;最高级别压缩会影响阅读体验,实用性打折扣。整体质量中上,基础功能扎实,细节打磨还需加强。适合对压缩率要求不高但需要保持基本可读性的场景使用。