X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bgzf.h;h=7d928a70f79a2261ebd8379ec9da7b9f9694963f;hb=e50413dd979a616b604914afd2488a308359ec6a;hp=4f69225684c8b1047aa47f1ff99d25118a90ce20;hpb=4e0a2f896484bc0792e81b7036a17a3f4b15d2dd;p=samtools.git diff --git a/bgzf.h b/bgzf.h index 4f69225..7d928a7 100644 --- a/bgzf.h +++ b/bgzf.h @@ -41,14 +41,14 @@ #define BGZF_ERR_MISUSE 8 typedef struct { - int errcode:30, is_write:2; - int compress_level, n_threads; + int errcode:16, is_write:2, compress_level:14; int cache_size; int block_length, block_offset; int64_t block_address; void *uncompressed_block, *compressed_block; void *cache; // a pointer to a hash table void *fp; // actual file handler; FILE* on writing; FILE* or knetFile* on reading + void *mt; // only used for multi-threading } BGZF; #ifndef KSTRING_T @@ -190,6 +190,8 @@ extern "C" { */ int bgzf_read_block(BGZF *fp); + void bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks); + #ifdef __cplusplus } #endif