For CLI and scripting use cases it would be nice to have:
result = engine.compress_file("path/to/large_output.json")
Instead of manually reading + passing to compress(). The method could auto-detect content type from the file extension and handle encoding.