]> git.donarmstrong.com Git - samtools.git/blobdiff - bgzf.h
* samtools-0.1.5-7 (r403)
[samtools.git] / bgzf.h
diff --git a/bgzf.h b/bgzf.h
index 68375b4e07f523ebe6c6b2efdb50b2951977695a..d5eeafe7e527c57823b8b68cb2c32511f1b0fadd 100644 (file)
--- a/bgzf.h
+++ b/bgzf.h
@@ -41,7 +41,9 @@ typedef struct {
     int64_t block_address;
     int block_length;
     int block_offset;
+       int cache_size;
     const char* error;
+       void *cache; // a pointer to a hash table
 } BGZF;
 
 #ifdef __cplusplus
@@ -104,6 +106,13 @@ int64_t bgzf_tell(BGZF* fp);
  */
 int64_t bgzf_seek(BGZF* fp, int64_t pos, int where);
 
+/*
+ * Set the cache size. Zero to disable. By default, caching is
+ * disabled. The recommended cache size for frequent random access is
+ * about 8M bytes.
+ */
+void bgzf_set_cache_size(BGZF *fp, int cache_size);
+
 #ifdef __cplusplus
 }
 #endif