diff --git a/bgzip.c b/bgzip.c index 129343fb5..2e887b028 100644 --- a/bgzip.c +++ b/bgzip.c @@ -39,6 +39,7 @@ #include "htslib/bgzf.h" #include "htslib/hts.h" #include "htslib/hfile.h" +#include "hfile_internal.h" // for hfile_set_blksize #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN @@ -337,6 +338,9 @@ int main(int argc, char **argv) return 1; } + // Increase block size to improve throughput on fast filesystems + hfile_set_blksize(f_src, 256*1024); + if (write_fname) { if (!exp_out_open) { // only open this file once for writing, close at the end if ((fp = bgzf_open(write_fname, out_mode)) == NULL) {