Java NIO doesn't allow the preservation of the compression method (STORED vs DEFLATED), so unfortunately we need to fall back to ZipEntry-based output for unknown files.

This commit is contained in:
Greg Leach
2015-03-24 20:14:05 -07:00
parent 5cf7696839
commit 628286c022
4 changed files with 92 additions and 27 deletions

View File

@ -308,6 +308,11 @@ public class BuildAndDecodeTest {
Map<String, String> control_files = (Map<String, String>)control.get("unknownFiles");
Map<String, String> test_files = (Map<String, String>)test.get("unknownFiles");
assertTrue(control_files.size() == test_files.size());
// Make sure that the compression methods are still the same
for(Map.Entry<String, String> controlEntry : control_files.entrySet()) {
assertTrue(controlEntry.getValue().equals(test_files.get(controlEntry.getKey())));
}
}
private boolean compareBinaryFolder(String path, boolean res)

View File

@ -12,5 +12,6 @@ versionInfo:
compressionType: false
unknownFiles:
hidden.file: '8'
stored.file: '0'
unk_folder/unknown_file: '8'
lib_bug603/bug603: '8'

View File

@ -0,0 +1 @@
This file is not compressed.