+ /*******************
+ * High-level APIs *
+ *******************/
+
+ tabix_t *ti_open(const char *fn, const char *fnidx);
+ int ti_lazy_index_load(tabix_t *t);
+ void ti_close(tabix_t *t);
+ ti_iter_t ti_query(tabix_t *t, const char *name, int beg, int end);
+ ti_iter_t ti_queryi(tabix_t *t, int tid, int beg, int end);
+ ti_iter_t ti_querys(tabix_t *t, const char *reg);
+ const char *ti_read(tabix_t *t, ti_iter_t iter, int *len);
+
+ /* Destroy the iterator */
+ void ti_iter_destroy(ti_iter_t iter);
+
+ /* Get the list of sequence names. Each "char*" pointer points to a
+ * internal member of the index, so DO NOT modify the returned
+ * pointer; otherwise the index will be corrupted. The returned
+ * pointer should be freed by a single free() call by the routine
+ * calling this function. The number of sequences is returned at *n. */
+ const char **ti_seqname(const ti_index_t *idx, int *n);
+
+ /******************
+ * Low-level APIs *
+ ******************/
+
+ /* Build the index for file <fn>. File <fn>.tbi will be generated
+ * and overwrite the file of the same name. Return -1 on failure. */