code: func (s *deltaIndexScanner) scan(buf []byte, end int) {
  	lastHash := 0
  	ptr := end - blksz
  
  	for {
  		key := hashBlock(buf, ptr)
  		tIdx := key & s.mask
  		head := s.table[tIdx]
  		if head != 0 && lastHash == key {
  			s.entries[head] = ptr
  		} else {
  			s.count++
  			eIdx := s.count
  			s.entries[eIdx] = ptr
  			s.next[eIdx] = head
  			s.table[tIdx] = eIdx
  		}
  
  		lastHash = key
  		ptr -= blksz
  
  		if 0 > ptr {
  			break
  		}
  	}
  }
docs: // slightly modified version of JGit's DeltaIndexScanner. We store the offset on the entries
  // instead of the entries and the key, so we avoid operations to retrieve the offset later, as
  // we don't use the key.
  // See: https://github.com/eclipse/jgit/blob/005e5feb4ecd08c4e4d141a38b9e7942accb3212/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndexScanner.java