What is a BR file?
A BR file is a compressed web file generated by applying the open source data compression algorithm, Brotli. It is used to store webpage assets such as stylesheets (CSS), images (SVG), XML, and scripting files (JS). Modern day websites, such as Chrome and Firefox, use BR files to reduce the page loading time, resulting in better user experience.
BR File Format
BR files are compressed web files that are generated using the Brotli compression algorithm. Brotli compression is a lossless data compression algorithm and was developed by Google to Zopfli compression algorithm. It is based on a combination of the LZ77 lossless compression algorithm and Huffman coding.
Due to its small size, BR files are used by web servers and content delivery networks (CDN). The requests made to these servers results in compression of HTTP content, making websites load faster. Brotli has become more popular and provides better compression than gzip.
Key Characteristics of the BR File Format
| Characteristic | Description |
|---|---|
| File Extension | .br |
| Superior Text Compression | Excels at compressing text-based files (HTML, CSS, JS, SVG, JSON) with significantly better ratios than gzip or Deflate. |
| Web-Native Design | Created specifically for HTTP content compression and enjoys universal browser support. |
| Asymmetric Processing | Typically uses more CPU time for compression than decompression, making it ideal for static content that is compressed once but served many times. |
| Non-Archival Format | Primarily a single-file compression format (like gzip) rather than a multi-file archive format (like ZIP). To bundle multiple files, they’re typically first archived with TAR then compressed with Brotli, creating a .tar.br file. |
| Open Standard | Brotli is defined in RFC 7932, making it an open, royalty-free compression algorithm that’s widely implementable across different platforms and languages. |
FAQ
Q1: Can BR files be used to compress images or videos?
A: While possible, BR is less efficient for already-compressed binary files like JPEG or MP4; it’s optimized for text-based content where it provides the most benefit.
Q2: How do I open a BR file on my computer?
A: Use decompression tools like 7-Zip, PeaZip, or command-line utilities like brotli, or extract them via most modern web browsers when downloaded from supported websites.
Q3: Is BR better than GZIP for website speed?
A: Yes, for static text assets, BR typically provides smaller file sizes, leading to faster downloads and improved website performance scores.
Q4: Do all web servers support BR compression?
A: Most modern servers (Apache via mod_brotli, NGINX via ngx_brotli, Cloudflare) support it, but it must be specifically configured, unlike the ubiquitous gzip.
Q5: Can I create BR files on any operating system?
A: Yes, through command-line tools or graphical utilities available for Windows, macOS, and Linux systems, often via package managers.