BGZF
| BGZF (Blocked GNU Zip Format) | |
|---|---|
| Filename extension |
.gz |
| Internet media type |
application/gzip |
| Magic number | `\x1f\x8b\x08\x04` (initial bytes, standard Gzip magic. BGZF adds specific extra fields in the header of each block.) |
| Developed by | SAMtools project / HTSlib |
| Initial release | c. 2009 (along with SAM/BAM format specification) |
| Type of format | Compressed file format, Indexed file format |
| Container for | Commonly used for bioinformatics data like SAM, BAM, VCF records |
| Extended from | Gzip |
| Standard | https://samtools.github.io/hts-specs/SAMv1.pdf#page=13.12 |
| Website | www |
Blocked GNU Zip Format (BGZF) is a variant of gzip file format that uses block compression, a method that compresses data in independent blocks of content—each of which is a valid gzip file. This design is utilized widely in bioinformatics for genomic data compression. The block-based design provides efficient storage, random access with indexed queries, and parallel processing; allowing large-scale data processing.
The format was developed as part of SAM/BAM specification and SAMtools. It is a core component of the common BAM format (the binary version of the Sequence Alignment Map format) and is also used to compress and index Variant Call Format (VCF), FASTA, and BED files. Because each block is a standard gzip block, a BGZF file can be decompressed by any standard gzip-compatible tool, ensuring backward compatibility. A general purpose compression utility for producing BGZF files bgzip is distributed with HTSlib software library.