encode_info moved from index.h to extract.c and simplified