X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=tabix.git;a=blobdiff_plain;f=bgzf.h;h=70f497e819442adc843f66c4023012fade6005e8;hp=f544a6791ff1dff8340212d859632d22063c55b6;hb=3be5ff47495762af7f2ebec145bc8f9c7674593d;hpb=f14cecb6523bd4275c2858c2d54167c94db25ede diff --git a/bgzf.h b/bgzf.h index f544a67..70f497e 100644 --- a/bgzf.h +++ b/bgzf.h @@ -62,6 +62,13 @@ typedef struct { extern "C" { #endif +/* + * Checks the magic string of the file. Returns 1 + * for bgzipped files, -1 on errors and 0 for files + * without the bgzip magic string. + */ +int is_bgzipped(const char *path); + /* * Open an existing file descriptor for reading or writing. * Mode must be either "r" or "w".