X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=tabix.git;a=blobdiff_plain;f=bgzf.h;h=7295f37425df320199aef87bb7bb80e482cc38bd;hp=70f497e819442adc843f66c4023012fade6005e8;hb=2112b1dba17e822d8028151605b4cdc01f0a4c3d;hpb=3be5ff47495762af7f2ebec145bc8f9c7674593d diff --git a/bgzf.h b/bgzf.h index 70f497e..7295f37 100644 --- a/bgzf.h +++ b/bgzf.h @@ -26,7 +26,6 @@ #include #include -#include #include #ifdef _USE_KNETFILE #include "knetfile.h" @@ -37,7 +36,7 @@ typedef struct { int file_descriptor; char open_mode; // 'r' or 'w' - bool owned_file, is_uncompressed; + int16_t owned_file, compress_level; #ifdef _USE_KNETFILE union { knetFile *fpr; @@ -62,13 +61,6 @@ 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". @@ -133,8 +125,10 @@ int64_t bgzf_seek(BGZF* fp, int64_t pos, int where); void bgzf_set_cache_size(BGZF *fp, int cache_size); int bgzf_check_EOF(BGZF *fp); - int bgzf_read_block(BGZF* fp); +int bgzf_flush(BGZF* fp); +int bgzf_flush_try(BGZF *fp, int size); +int bgzf_check_bgzf(const char *fn); #ifdef __cplusplus }