Beispiel #1
0
        internal PackReverseIndexV2(PackIndexV2 index)
        {
            Index = index;

              // Traverse index and build reverse-version
              offsets = new int[Index.NumberOfObjects];
              objectList = new int[Index.NumberOfObjects];

              int indexCount = 0;
              foreach (PackIndexEntry entry in Index)
              {
            offsets[indexCount] = entry.Offset;
            indexCount++;
              }

              Array.Sort(offsets);

              indexCount = 0;
              foreach (PackIndexEntry entry in Index)
              {
            objectList[Array.BinarySearch(offsets, entry.Offset)] = indexCount;
            indexCount++;
              }
        }
Beispiel #2
0
 internal PackV2(Repository repo, string path)
     : base(repo, path)
 {
     Index = new PackIndexV2(IndexFilePath);
     Pack  = new PackV2Pack(Repo, PackFilePath);
 }
Beispiel #3
0
 internal PackV2(Repository repo, string path)
     : base(repo, path)
 {
     Index = new PackIndexV2(IndexFilePath);
       Pack = new PackV2Pack(Repo, PackFilePath);
 }