在 java/android zip4j 中解压太慢
unzip is too slow in java/android zip4j
我在 android 中使用 Zip4j 库。我正在用密码解压文件,速度很慢。
这是我的做法:
public boolean unzipFile(){
String path= FileController.getInstance().getAbsolutePath();
String source = path+"/program.zip";
String destination = path+"/cache_content/";
String password = "123456789";
long millis=Calendar.getInstance().getTimeInMillis();
try {
ZipFile zipFile = new ZipFile(source);
if (zipFile.isEncrypted()) {
zipFile.setPassword(password);
}
zipFile.extractAll(destination);
Log.i("time_zipper",(Calendar.getInstance().getTimeInMillis()-millis)/1000+"");
return true;
} catch (ZipException e) {
e.printStackTrace();
return false;
}
}
88秒解压8Mb文件,我想加快解压速度
我已经禁用了密码,它在 3 秒内生效。
我在 android 中使用 Zip4j 库。我正在用密码解压文件,速度很慢。
这是我的做法:
public boolean unzipFile(){
String path= FileController.getInstance().getAbsolutePath();
String source = path+"/program.zip";
String destination = path+"/cache_content/";
String password = "123456789";
long millis=Calendar.getInstance().getTimeInMillis();
try {
ZipFile zipFile = new ZipFile(source);
if (zipFile.isEncrypted()) {
zipFile.setPassword(password);
}
zipFile.extractAll(destination);
Log.i("time_zipper",(Calendar.getInstance().getTimeInMillis()-millis)/1000+"");
return true;
} catch (ZipException e) {
e.printStackTrace();
return false;
}
}
88秒解压8Mb文件,我想加快解压速度
我已经禁用了密码,它在 3 秒内生效。