diff options
author | Keuin <[email protected]> | 2020-12-29 10:06:01 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2020-12-29 10:06:01 +0800 |
commit | 82e3986045ac7eaca6aaa290fb2283fd6c6c901a (patch) | |
tree | 2a1783e8ded2d5dbe9b7365a9b5f71757310e046 /src/main/java/com/keuin/kbackupfabric/operation/backup | |
parent | fd9124f475422f62691fb542c3f8f35790b65d9b (diff) |
Support specifying zip compression level (not finished)
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/operation/backup')
-rw-r--r-- | src/main/java/com/keuin/kbackupfabric/operation/backup/PrimitiveBackupMethod.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/operation/backup/PrimitiveBackupMethod.java b/src/main/java/com/keuin/kbackupfabric/operation/backup/PrimitiveBackupMethod.java index 854355d..72e9cdb 100644 --- a/src/main/java/com/keuin/kbackupfabric/operation/backup/PrimitiveBackupMethod.java +++ b/src/main/java/com/keuin/kbackupfabric/operation/backup/PrimitiveBackupMethod.java @@ -18,6 +18,7 @@ import static org.apache.commons.io.FileUtils.forceDelete; public class PrimitiveBackupMethod implements BackupMethod { private static final PrimitiveBackupMethod INSTANCE = new PrimitiveBackupMethod(); + private static int zipLevel = 9; public static PrimitiveBackupMethod getInstance() { return INSTANCE; @@ -31,7 +32,7 @@ public class PrimitiveBackupMethod implements BackupMethod { PrintUtil.info(String.format("zip(srcPath=%s, destPath=%s)", levelPath, backupSaveDirectory)); PrintUtil.info("Compressing level ..."); - ZipUtil.makeBackupZip(levelPath, backupSaveDirectory, backupFileName, backupMetadata); + ZipUtil.makeBackupZip(levelPath, backupSaveDirectory, backupFileName, backupMetadata, zipLevel); } catch (ZipUtilException exception) { PrintUtil.info("Infinite recursive of directory tree detected, backup was aborted."); |