Skip to content

Add BGZF streaming I/O support#10

Open
tfenne wants to merge 1 commit into
mainfrom
tf_bgzf_streams
Open

Add BGZF streaming I/O support#10
tfenne wants to merge 1 commit into
mainfrom
tf_bgzf_streams

Conversation

@tfenne

@tfenne tfenne commented Apr 8, 2026

Copy link
Copy Markdown
Member

Add BgzfOutputStream and BgzfInputStream for streaming BGZF (Blocked GNU Zip Format) compression and decompression using libdeflate.

BGZF is the de facto standard compression format for high-throughput sequencing data (BAM, VCF, etc.). Each block is an independent gzip member at most 64KB, which fits libdeflate's whole-buffer model.

New classes in com.fulcrumgenomics.jlibdeflate.stream:

  • Bgzf: constants, virtual offset utilities, format detection, and stream factory (newGzipInputStream with closure-based fallback)
  • BgzfOutputStream: synchronous writer with bgzfPosition() tracking
  • BgzfInputStream: synchronous reader with bgzfPosition() tracking

Also refactors LibdeflateBenchmark to use shared Bgzf constants and adds a BGZF Streaming I/O section to the README.

Add BgzfOutputStream and BgzfInputStream for streaming BGZF (Blocked
GNU Zip Format) compression and decompression using libdeflate.

BGZF is the de facto standard compression format for high-throughput
sequencing data (BAM, VCF, etc.).  Each block is an independent gzip
member at most 64KB, which fits libdeflate's whole-buffer model.

New classes in com.fulcrumgenomics.jlibdeflate.stream:
- Bgzf: constants, virtual offset utilities, format detection, and
  stream factory (newGzipInputStream with closure-based fallback)
- BgzfOutputStream: synchronous writer with bgzfPosition() tracking
- BgzfInputStream: synchronous reader with bgzfPosition() tracking

Also refactors LibdeflateBenchmark to use shared Bgzf constants and
adds a BGZF Streaming I/O section to the README.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant