Zipping and Unzipping Files Using Salesforce B2C Commerce Script

If you have large files, it's recommended that you zip them for file transfer. You can automate the zip process if you are using a pipeline to transfer files by creating scripts.

The B2C Commerce API supports the creation and extraction of .zip files.

Example:

var catalog: File = new File('/catalog');
catalog.zip('/temp/catalog.zip');
var catalogZip : File = new File('/temp/catalog.zip');
catalogZip.unzip('/temp/catalog'); // /temp/catalog created to store unzipped contents.