Another Pack_index.c implemented to perform binary search.