Introduction
BGZF, the Blocked GNU Zip Format, is the compression used by
bgzip from the HTSlib project and by
genomics tools built on it. It is still a valid gzip
file, but cut into small blocks so that a program can jump into the middle. Such files
usually end in .gz; the analysis library Hail expects block compressed VCF
files to be named .vcf.bgz.
Structure
A BGZF file is a series of gzip members. Each block is under 64 KB both before and after
compression, and carries a gzip extra field named BC that records the size
of the compressed block. An optional .gzi index lists the compressed and
uncompressed offsets of the blocks.
Not described
This page is a first outline. The details of the layout are not yet described here.
Known, not yet covered
- Reference: the block header, end-of-file marker, virtual offsets and index layout, which the SAM specification and HTSlib documentation cover.
- Viewer: the site has no viewer for BGZF as such.
Links
Software
Developers
- HTSlib – library for high-throughput sequencing files (C)
Reference
- bgzip manual page – describes BGZF and the .gzi index
- hts-specs – the SAM/BAM specifications, which define BGZF
- Hail import and export – documents the
.vcf.bgzname