Class DfsPackCompactor

java.lang.Object
org.eclipse.jgit.internal.storage.dfs.DfsPackCompactor

public class DfsPackCompactor extends Object
Combine several pack files into one pack.

The compactor combines several pack files together by including all objects contained in each pack file into the same output pack. If an object appears multiple times, it is only included once in the result. Because the new pack is constructed by enumerating the indexes of the source packs, it is quicker than doing a full repack of the repository, however the result is not nearly as space efficient as new delta compression is disabled.

This method is suitable for quickly combining several packs together after receiving a number of small fetch or push operations into a repository, allowing the system to maintain reasonable read performance without expending a lot of time repacking the entire repository.