Today I was in the need to create a zip archive in VASmalltalk and zip-code had been introduced with the new Monticello Importer in version 8.5.2 (application: MZZipUnzipApp)
Documentation is spare and therefore a simple code example how to create a zip archive (and as a reminder for me):
| cfsPath zipArchive | "where all my files are located" cfsPath := CfsPath named: 'D:\json-sendelisten'. "my zip archive to write" zipArchive := MZZipArchive openWrite: 'd:\test8.zip'. "i want to add all file from that directory ..." cfsPath fileEntries do: [ :eachFileEntry | | singleFile fileContent | singleFile := cfsPath append: eachFileEntry dName. "method from MSKCfsExtension" fileContent := singleFile mskGetBinaryContent. zipArchive "create a current file within the archive" createFile: eachFileEntry dName comment: '' method: MZConstants::Z_DEFLATED level: MZConstants::Z_BESTCOMPRESSION; "write the binay content of the file to the archive" write: fileContent ; "close the current file in the archive" closeCurrentFile. ]. "close the archive" zipArchive close.