HTTP Response Compression with Self Hosted

I’m only aware of ToOptimizedResult being used in the context of wrapping a DTO response object, which would mean we have to refactor all methods to return object for this to work?

This also won’t apply to anything outside of service methods e.g. JS, CSS files (main concern)?

Is there a way to get this done so we can compress static files and service responses without a lot of refactoring?