]> git.kaiwu.me - klib.git/commitdiff
expose bgzf_read_block()
authorHeng Li <lh3@live.co.uk>
Fri, 28 Oct 2011 18:52:55 +0000 (14:52 -0400)
committerHeng Li <lh3@live.co.uk>
Fri, 28 Oct 2011 18:52:55 +0000 (14:52 -0400)
bgzf.c
bgzf.h

diff --git a/bgzf.c b/bgzf.c
index 76e266c87341ac1d78f7099407784fed35464791..79c3818f2a04a0f0ada7ab5ca3502cc866341c73 100644 (file)
--- a/bgzf.c
+++ b/bgzf.c
@@ -325,7 +325,7 @@ static int load_block_from_cache(BGZF *fp, int64_t block_address) {return 0;}
 static void cache_block(BGZF *fp, int size) {}
 #endif
 
-static int bgzf_read_block(BGZF *fp)
+int bgzf_read_block(BGZF *fp)
 {
        uint8_t header[BLOCK_HEADER_LENGTH], *compressed_block;
        int count, size = 0, block_length, remaining;
diff --git a/bgzf.h b/bgzf.h
index 1a3fe21e9ebacc54d3c1225246b24399d1fc582f..1fdf6259d5d860973ac25465049162b1889b52c0 100644 (file)
--- a/bgzf.h
+++ b/bgzf.h
@@ -181,6 +181,11 @@ extern "C" {
         */
        int bgzf_getline(BGZF *fp, int delim, kstring_t *str);
 
+       /**
+        * Read the next BGZF block.
+        */
+       int bgzf_read_block(BGZF *fp);
+
 #ifdef __cplusplus
 }
 #endif