To create zip files, you make use of the built in function. It has arguments for format (either zip or gzip), the source path, and the destination path.
"CORS is a security feature in browsers that checks whether one domain can access resources from another, typically through preflight requests to verify permissions."