Home
last modified time | relevance | path

Searched refs:MinimalZipEntry (Results 1 – 19 of 19) sorted by relevance

/external/archive-patcher/generator/src/test/java/com/google/archivepatcher/generator/
DMinimalZipEntryTest.java41 private MinimalZipEntry defaultEntry;
42 private MinimalZipEntry clonedDefaultEntry;
43 private MinimalZipEntry alteredCompressionMethod;
44 private MinimalZipEntry alteredCrc32;
45 private MinimalZipEntry alteredCompressedSize;
46 private MinimalZipEntry alteredUncompressedSize;
47 private MinimalZipEntry alteredFileNameBytes;
48 private MinimalZipEntry alteredGeneralPurposeBitFlag11;
49 private MinimalZipEntry alteredOffsetOfLocalEntry;
50 private MinimalZipEntry alteredFileOffsetOfCompressedData;
[all …]
DTotalRecompressionLimiterTest.java37 private static final MinimalZipEntry UNIMPORTANT = makeFakeEntry("/unimportant", 1337);
38 private static final MinimalZipEntry ENTRY_A_100K = makeFakeEntry("/a/100k", 100 * 1024);
39 private static final MinimalZipEntry ENTRY_B_200K = makeFakeEntry("/b/200k", 200 * 1024);
40 private static final MinimalZipEntry ENTRY_C_300K = makeFakeEntry("/c/300k", 300 * 1024);
41 private static final MinimalZipEntry ENTRY_D_400K = makeFakeEntry("/d/400k", 400 * 1024);
42 private static final MinimalZipEntry IGNORED_A = makeFakeEntry("/ignored/a", 1234);
43 private static final MinimalZipEntry IGNORED_B = makeFakeEntry("/ignored/b", 5678);
44 private static final MinimalZipEntry IGNORED_C = makeFakeEntry("/ignored/c", 9101112);
45 private static final MinimalZipEntry IGNORED_D = makeFakeEntry("/ignored/d", 13141516);
154 private static MinimalZipEntry makeFakeEntry(String path, long uncompressedSize) { in makeFakeEntry()
[all …]
DDeltaFriendlyOldBlobSizeLimiterTest.java38 private static final MinimalZipEntry UNIMPORTANT = makeFakeEntry("/unimportant", 1337, 1337);
39 private static final MinimalZipEntry ENTRY_A_100K =
41 private static final MinimalZipEntry ENTRY_B_200K =
43 private static final MinimalZipEntry ENTRY_C_300K =
45 private static final MinimalZipEntry ENTRY_D_400K =
47 private static final MinimalZipEntry IGNORED_A = makeFakeEntry("/ignored/a", 1234, 5678);
48 private static final MinimalZipEntry IGNORED_B = makeFakeEntry("/ignored/b", 5678, 9101112);
49 private static final MinimalZipEntry IGNORED_C = makeFakeEntry("/ignored/c", 9101112, 13141516);
127 private static MinimalZipEntry makeFakeEntry( in makeFakeEntry()
130 return new MinimalZipEntry( in makeFakeEntry()
DQualifiedRecommendationTest.java33 private static final MinimalZipEntry ENTRY1 = new MinimalZipEntry(0, 1, 2, 3, FILENAME1, true, 0);
34 private static final MinimalZipEntry ENTRY2 = new MinimalZipEntry(1, 2, 3, 4, FILENAME2, true, 0);
DPreDiffPlannerTest.java96 private Map<File, Map<ByteArrayHolder, MinimalZipEntry>> entriesByPathByTempFile;
101 entriesByPathByTempFile = new HashMap<File, Map<ByteArrayHolder, MinimalZipEntry>>(); in setup()
129 Map<ByteArrayHolder, MinimalZipEntry> entriesByPath = new HashMap<>(); in storeAndMapArchive()
130 for (MinimalZipEntry zipEntry : MinimalZipArchive.listEntries(file)) { in storeAndMapArchive()
144 private MinimalZipEntry findEntry(File tempFile, UnitTestZipEntry unitTestEntry) { in findEntry()
145 Map<ByteArrayHolder, MinimalZipEntry> subMap = entriesByPathByTempFile.get(tempFile); in findEntry()
164 MinimalZipEntry found = findEntry(tempFile, unitTestEntry); in findRangeWithoutParams()
179 MinimalZipEntry found = findEntry(tempFile, unitTestEntry); in findRangeWithParams()
221 MinimalZipEntry candidate = MinimalZipParser.parseCentralDirectoryEntry(rafis); in corruptCompressionMethod()
242 Map<ByteArrayHolder, MinimalZipEntry> originalOldArchiveZipEntriesByPath = in invokeGeneratePreDiffPlan()
[all …]
DPreDiffExecutorTest.java94 private MinimalZipEntry findEntry(File file, String path) throws IOException { in findEntry()
95 List<MinimalZipEntry> entries = MinimalZipArchive.listEntries(file); in findEntry()
96 for (MinimalZipEntry entry : entries) { in findEntry()
174 MinimalZipEntry oldEntry = findEntry(oldFile, ENTRY_LEVEL_6.path); in testPrepareForDiffing_OneCompressedEntry_Changed()
190 MinimalZipEntry newEntry = findEntry(newFile, ENTRY_LEVEL_9.path); in testPrepareForDiffing_OneCompressedEntry_Changed()
DMinimalZipParserTest.java160 MinimalZipEntry parsed = MinimalZipParser.parseCentralDirectoryEntry(in); in testParseCentralDirectoryEntry()
198 List<MinimalZipEntry> parsedEntries = new ArrayList<MinimalZipEntry>(); in testParseLocalEntryAndGetCompressedDataOffset()
205 MinimalZipEntry parsedEntry = parsedEntries.get(x); in testParseLocalEntryAndGetCompressedDataOffset()
DMinimalZipArchiveTest.java76 List<MinimalZipEntry> parsedEntries = MinimalZipArchive.listEntries(tempFile); in testListEntries()
80 MinimalZipEntry actual = parsedEntries.get(x); in testListEntries()
/external/archive-patcher/generator/src/main/java/com/google/archivepatcher/generator/
DPreDiffPlanner.java49 private final Map<ByteArrayHolder, MinimalZipEntry> oldArchiveZipEntriesByPath;
54 private final Map<ByteArrayHolder, MinimalZipEntry> newArchiveZipEntriesByPath;
82 Map<ByteArrayHolder, MinimalZipEntry> oldArchiveZipEntriesByPath, in PreDiffPlanner()
84 Map<ByteArrayHolder, MinimalZipEntry> newArchiveZipEntriesByPath, in PreDiffPlanner()
159 for (Map.Entry<ByteArrayHolder, MinimalZipEntry> newEntry : in getDefaultRecommendations()
162 MinimalZipEntry oldZipEntry = oldArchiveZipEntriesByPath.get(newEntryPath); in getDefaultRecommendations()
166 List<MinimalZipEntry> identicalEntriesInOldArchive = in getDefaultRecommendations()
198 …private QualifiedRecommendation getRecommendation(MinimalZipEntry oldEntry, MinimalZipEntry newEnt… in getRecommendation()
276 private boolean unsuitable(MinimalZipEntry oldEntry, MinimalZipEntry newEntry) { in unsuitable()
297 private boolean unsuitableDeflate(MinimalZipEntry newEntry) { in unsuitableDeflate()
[all …]
DMinimalZipArchive.java39 private static final Comparator<MinimalZipEntry> LOCAL_ENTRY_OFFSET_COMAPRATOR =
40 new Comparator<MinimalZipEntry>() {
42 public int compare(MinimalZipEntry o1, MinimalZipEntry o2) {
54 public static List<MinimalZipEntry> listEntries(File file) throws IOException { in listEntries()
66 private static List<MinimalZipEntry> listEntriesInternal(RandomAccessFileInputStream in) in listEntriesInternal()
83 List<MinimalZipEntry> minimalZipEntries = in listEntriesInternal()
84 new ArrayList<MinimalZipEntry>(centralDirectoryMetadata.getNumEntriesInCentralDirectory()); in listEntriesInternal()
94 MinimalZipEntry entry = minimalZipEntries.get(x); in listEntriesInternal()
DQualifiedRecommendation.java26 private final MinimalZipEntry oldEntry;
31 private final MinimalZipEntry newEntry;
51 MinimalZipEntry oldEntry, in QualifiedRecommendation()
52 MinimalZipEntry newEntry, in QualifiedRecommendation()
66 public MinimalZipEntry getOldEntry() { in getOldEntry()
74 public MinimalZipEntry getNewEntry() { in getNewEntry()
DPreDiffExecutor.java203 Map<ByteArrayHolder, MinimalZipEntry> originalOldArchiveZipEntriesByPath = in generatePreDiffPlan()
204 new HashMap<ByteArrayHolder, MinimalZipEntry>(); in generatePreDiffPlan()
205 Map<ByteArrayHolder, MinimalZipEntry> originalNewArchiveZipEntriesByPath = in generatePreDiffPlan()
206 new HashMap<ByteArrayHolder, MinimalZipEntry>(); in generatePreDiffPlan()
210 for (MinimalZipEntry zipEntry : MinimalZipArchive.listEntries(originalOldFile)) { in generatePreDiffPlan()
DMinimalZipEntry.java23 public class MinimalZipEntry { class
83 public MinimalZipEntry( in MinimalZipEntry() method in MinimalZipEntry
246 MinimalZipEntry other = (MinimalZipEntry) obj; in equals()
DDefaultDeflateCompressionDiviner.java56 public final MinimalZipEntry minimalZipEntry;
71 MinimalZipEntry minimalZipEntry, JreDeflateParameters divinedParameters) { in DivinationResult()
93 for (MinimalZipEntry minimalZipEntry : MinimalZipArchive.listEntries(archiveFile)) { in divineDeflateParameters()
DMinimalZipParser.java145 public static MinimalZipEntry parseCentralDirectoryEntry(InputStream in) throws IOException { in parseCentralDirectoryEntry()
186 return new MinimalZipEntry( in parseCentralDirectoryEntry()
/external/archive-patcher/generator/src/main/java/com/google/archivepatcher/generator/similarity/
DCrc32SimilarityFinder.java17 import com.google.archivepatcher.generator.MinimalZipEntry;
37 private final Map<Long, List<MinimalZipEntry>> baseEntriesByCrc32 = new HashMap<>();
44 public Crc32SimilarityFinder(File baseArchive, Collection<MinimalZipEntry> baseEntries) { in Crc32SimilarityFinder()
46 for (MinimalZipEntry oldEntry : baseEntries) { in Crc32SimilarityFinder()
48 List<MinimalZipEntry> entriesForCrc32 = baseEntriesByCrc32.get(crc32); in Crc32SimilarityFinder()
58 public List<MinimalZipEntry> findSimilarFiles(File newArchive, MinimalZipEntry newEntry) { in findSimilarFiles()
59 List<MinimalZipEntry> matchedEntries = in findSimilarFiles()
DSimilarityFinder.java21 import com.google.archivepatcher.generator.MinimalZipEntry;
36 protected final Collection<MinimalZipEntry> baseEntries;
44 public SimilarityFinder(File baseArchive, Collection<MinimalZipEntry> baseEntries) { in SimilarityFinder()
58 public abstract List<MinimalZipEntry> findSimilarFiles(File newArchive, MinimalZipEntry newEntry); in findSimilarFiles()
/external/archive-patcher/explainer/src/main/java/com/google/archivepatcher/explainer/
DPatchExplainer.java20 import com.google.archivepatcher.generator.MinimalZipEntry;
104 Map<ByteArrayHolder, MinimalZipEntry> allOldEntries = mapEntries(oldFile); in explainPatch()
105 Map<ByteArrayHolder, MinimalZipEntry> allNewEntries = mapEntries(newFile); in explainPatch()
106 Map<ByteArrayHolder, MinimalZipEntry> completelyNewEntries = new HashMap<>(allNewEntries); in explainPatch()
110 for (Map.Entry<ByteArrayHolder, MinimalZipEntry> entry : completelyNewEntries.entrySet()) { in explainPatch()
215 private long getCompressedSize(File file, MinimalZipEntry entry, Compressor compressor) in getCompressedSize()
290 private static Map<ByteArrayHolder, MinimalZipEntry> mapEntries(File file) throws IOException { in mapEntries()
291 List<MinimalZipEntry> allEntries = MinimalZipArchive.listEntries(file); in mapEntries()
292 Map<ByteArrayHolder, MinimalZipEntry> result = new HashMap<>(allEntries.size()); in mapEntries()
293 for (MinimalZipEntry entry : allEntries) { in mapEntries()
/external/archive-patcher/explainer/src/test/java/com/google/archivepatcher/explainer/
DPatchExplainerTest.java20 import com.google.archivepatcher.generator.MinimalZipEntry;
341 MinimalZipEntry newEntry = MinimalZipArchive.listEntries(newFile).get(0); in testExplainPatch_Unsuitable()