Random access gzip stream

后端 未结 4 1418
余生分开走
余生分开走 2020-12-15 08:32

I\'d like to be able to do random access into a gzipped file. I can afford to do some preprocessing on it (say, build some kind of index), provided that the result of the pr

4条回答
  •  暖寄归人
    2020-12-15 09:23

    The BGZF file format, compatible with GZIP was developped by the biologists.

    (...) The advantage of BGZF over conventional gzip is that BGZF allows for seeking without having to scan through the entire file up to the position being sought.

    In http://picard.svn.sourceforge.net/viewvc/picard/trunk/src/java/net/sf/samtools/util/ , have a look at BlockCompressedOutputStream and BlockCompressedInputStream.java

提交回复
热议问题