Skip to main content

Module compressor

Module compressor 

Source

Functionsยง

aggressive_compress
diff_content
lightweight_cleanup
Lightweight post-processing cleanup: collapses consecutive closing braces, removes whitespace-only lines, and limits consecutive blank lines to 1.
safeguard_ratio
Safeguard: ensures compression ratio stays within safe bounds. Returns the compressed content if ratio is in [0.15, 1.0], otherwise the original.