messageln("File " + compressedName + " has an unknown suffix. Cannot determine file type.");
mimeType = MimeType.BINARY_TYPE;
}
message("storing document " + compressedName + " (" + i + " of " + files.length + ") " + "...");
document = collection.createResource(URIUtils.urlEncodeUtf8(compressedName), mimeType.getXMLDBType());
document.setContent(isCompressed?new GZIPInputSource(files[i]):files[i]);
((EXistResource)document).setMimeType(mimeType.getName());
collection.storeResource(document);
++filesCount;
messageln(" " + files[i].length() + (isCompressed?" compressed":"") + " bytes in "
+ (System.currentTimeMillis() - start1) + "ms.");