You can write to the file store and then return a presignedUrl to the content, this will likely make for slow responses though, you would be fetching, writing, redirecting essentially.
to gzip, use a lib like:
https://www.npmjs.com/package/node-gzip
ultimately Runtime actions ( and serverless in general ) is not well suited for SSR