Atitit 压缩文件zip总结
注意孔目录 以及 递归目录
/springbootUpload/src/springbootUploadPkg/ZipUtilCompressPart.java
File file = new File("D:\\00000up\\A157BB5CDF77567B41E9222C07AF41DA.png");
String zipFileName2 = "d:\\00000up.zip";
String relativePath = "zipdir/";
ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFileName2));
// 创建一个zip压缩项
ZipEntry entry = new ZipEntry(relativePath + file.getName());
// 放入zip文件输出流
zos.putNextEntry(entry);
// 将文件读取输入zip文件里面
IOUtils.copy(new FileInputStream(file), zos);
zos.flush();
zos.close();
System.out.println("--f");
String directory="D:\\00000up";
.jar";
// System.out.println(unzip_filelist(f));
zipV2saa("d:\\00000up.zip", directory);
("d:\\00000up.zip","00000up/", directory);zipV2saa