Webfiles
The Compressor Webfiles API provides fast, lossless optimization for common web asset formats. It is designed to reduce file size without altering behavior, structure, or semantics — making it ideal for production websites, APIs, and frontend delivery pipelines.
By applying safe minification and structural optimizations, Compressor helps improve load times, reduce bandwidth usage, and enhance overall performance without introducing breaking changes.
Typical Use Cases
- Minifying frontend assets for faster page loads
- Optimizing API responses and configuration files
- Reducing storage and transfer size for static websites
- Automating build and deployment pipelines
Webfile Optimization
Web file optimization is applied automatically and does not require selecting a compression level. The API uses format-specific techniques to remove unnecessary whitespace, comments, and redundant structures while preserving functional equivalence.
No additional configuration is required.
Supported Input Formats
The Webfiles API accepts the following formats: JavaScript (.js), CSS (.css), HTML (.html), JSON (.json), XML (.xml), Property List (.plist).
Input format detection is automatic and does not require additional configuration.
Output Formats
All web files retain their original format after processing:
- JS → JS
- CSS → CSS
- HTML → HTML
- JSON → JSON
- XML → XML
- PLIST → PLIST
This guarantees compatibility with existing build systems, browsers, and runtimes.
Notes & Best Practices
- File semantics and behavior are preserved.
- Web file processing is fast and handled synchronously.