]> git.donarmstrong.com Git - samtools.git/blobdiff - bgzf.h
works
[samtools.git] / bgzf.h
diff --git a/bgzf.h b/bgzf.h
index 2a70bb902771d937432602045842bf7e0cf1711c..cb67681544b51f96efef226fa7a6232124c43420 100644 (file)
--- a/bgzf.h
+++ b/bgzf.h
@@ -31,6 +31,7 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <zlib.h>
+#include <sys/types.h>
 
 #define BGZF_BLOCK_SIZE     0xff00 // make sure compressBound(BGZF_BLOCK_SIZE) < BGZF_MAX_BLOCK_SIZE
 #define BGZF_MAX_BLOCK_SIZE 0x10000
@@ -190,6 +191,13 @@ extern "C" {
         */
        int bgzf_read_block(BGZF *fp);
 
+       /**
+        * Enable multi-threading (only effective on writing)
+        *
+        * @param fp          BGZF file handler; must be opened for writing
+        * @param n_threads   #threads used for writing
+        * @param n_sub_blks  #blocks processed by each thread; a value 64-256 is recommended
+        */
        int bgzf_mt(BGZF *fp, int n_threads, int n_sub_blks);
 
 #ifdef __cplusplus