.\" Generated by the Allegro makedoc utility .TH create_datafile_index 3alleg4 "version 4.4.3" "Allegro" "Allegro manual" .SH NAME create_datafile_index \- Creates an index for a datafile. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B DATAFILE_INDEX *create_datafile_index(const char *filename); .SH DESCRIPTION Creates an index for a datafile, to speed up loading single objects out of it. This is mostly useful for big datafiles, which you don't want to load as a whole. The index will store the offset of all objects inside the datafile, and then you can load it quickly with "load_datafile_object_indexed" later. Use destroy_datafile_index to free the memory used by it again. Note: If the datafile uses global compression, there is no performance gain from using an index, because seeking to the offset still requires to uncompress the whole datafile up to that offset. Example: .nf DATAFILE_INDEX *index = create_datafile_index("huge.dat"); DATAFILE *object = load_datafile_object_indexed(index, 1234); ... unload_datafile_object(object); destroy_datafile_index(index); .fi .SH "RETURN VALUE" A pointer value which you can pass to load_datafile_object_indexed. .SH SEE ALSO .BR destroy_datafile_index (3alleg4), .BR load_datafile_object_indexed (3alleg4)