Simple, select the files and folders you wish to Zip. Then, right click on to them and select Compress. Now here you will have to select the compression options – zip or tar.xz or 7z. Select the one and click CREATE button. It will create the Zip archive. Using Zip Command The bas...
importjava.util.zip.{ZipEntry,ZipOutputStream} defcompress(sourceFolder:String,zipFile:String):Unit={ val conf=newConfiguration() val fs=FileSystem.get(conf) try{ // 创建ZIP输出流对象 val outputStream=fs.create(newPath(zipFile)) val zipStream=newZipOutputStream(outputStream) // 递归压缩源文...