nr=0;for(i=0;i<256;i++){unsignedn=ntohl(top_index[i]);if(n<nr)die("corrupt index file");nr=n;}for(i=0;i<nr;i++){unsignedoffset;if(fread(entry,24,1,stdin)!=1)die("unable to read entry %u/%u",i,nr);offset=ntohl(entry[0]);printf("%u %s\n",offset,sha1_to_hex((void*)(entry+1)));}return0;}