# zip **Repository Path**: ymyang/zip ## Basic Information - **Project Name**: zip - **Description**: zip & unzip - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-24 - **Last Updated**: 2021-12-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # zip zip & unzip 使用ant实现文件的压缩与解压缩 public static void zip(File target, File source) { Zip zip = new Zip(); zip.setProject(new Project()); zip.setDestFile(target); zip.setBasedir(source); zip.setEncoding("gbk"); zip.execute(); } public static void unzip(File target, File source) { Expand expand = new Expand(); expand.setProject(new Project()); expand.setDest(target); expand.setSrc(source); expand.setEncoding("gbk"); expand.execute(); }