use of net.lingala.zip4j.core.ZipFile in project grakn by graknlabs.
the class DistributionContext method unzipDistribution.
private void unzipDistribution() throws ZipException {
// Unzip the distribution
ZipFile zipped = new ZipFile(ZIP_FULLPATH.toFile());
zipped.extractAll(TARGET_DIRECTORY.toAbsolutePath().toString());
}
use of net.lingala.zip4j.core.ZipFile in project ArachneCentralAPI by OHDSI.
the class AnalysisHelper method compressAndSplit.
public void compressAndSplit(ArrayList<File> files, File zipArchive) {
try {
ZipFile zipFile = new ZipFile(zipArchive.getAbsoluteFile());
ZipParameters parameters = new ZipParameters();
parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);
zipFile.createZipFile(files, parameters, true, maximumSize);
} catch (ZipException ex) {
LOGGER.error(ex.getMessage(), ex);
throw new ConverterRuntimeException(ex.getMessage());
}
}
Aggregations