
Htslib is an implementation of a unified c library for accessing common file formats, such as sam (sequence alignment/map), cram and vcf (variant call format), used for high-throughput sequencing data, and is the core library used by samtools and bcftools. htslib only depends on zlib. it is known to be compatible with gcc, g++ and clang.
htslib implements a generalized bam (binary sam) index, with file extension ??csi?? (coordinate-sorted index). the htslib file reader first looks for the new index and then for the old if the new index is absent.