+
+ final long compressionRatio = totalSizeEntry / entry.getCompressedSize();
+ if (compressionRatio > THRESHOLD_RATIO) {
+ return Single.error(new Exception("Wrong file type, threshold to high."));
+ }
+
+ if (totalEntryArchive > THRESHOLD_ENTRIES) {
+ // too much entries in this archive, can lead to inodes exhaustion of the system
+ return Single.error(new Exception("Too many files"));
+ }
+