压缩:ZipInStreamput,获取时用getNextEntry(),成员为ZipEntry
public static void unzip(File src,File desk) throws IOException {
ZipInputStream zip = new ZipInputStream(new FileInputStream(src));
ZipEntry ze;
while((ze = zip.getNextEntry()) != null){
if(ze.isDirectory()){
File f = new File(desk,ze.toString());
f.mkdirs();
}else{
FileOutputStream fos = new FileOutputStream(new File(desk,ze.toString()));
int a;
while((a = zip.read()) != -1){
fos.write(a);
}
fos.close();
zip.closeEntry();
}
}