What is MIME type "application/x-gzip-compressed"?

A MIME type is a string that tells browsers and other tools how to handle a particular kind of file.

application/x-gzip-compressed indicates that a file is compressed using the gzip algorithm. It reduces file size so that storage and transfer become faster and more efficient.
Gzip works by compressing a file's data. It is popular in Unix-like systems and on the web for serving compressed content.
Files using this MIME type include those with extensions such as GZ, EMZ, and TGZ. Similar archives often end with -GZ in their names.
Check additional details on the gzip reference for more technical insights.

Associated file extensions

Usage Examples

HTTP Header

When serving content with this MIME type, set the Content-Type header:


    Content-Type: application/x-gzip-compressed    
  

HTML

In HTML, you can specify the MIME type in various elements:


    <a href="file.dat" type="application/x-gzip-compressed">Download file</a>    
  

Server-side (Node.js)

Setting the Content-Type header in Node.js:


    const http = require('http');    
    
    http.createServer((req, res) => {    
      res.setHeader('Content-Type', 'application/x-gzip-compressed');    
      res.end('Content here');    
    }).listen(3000);    
  

Associated file extensions

FAQs

Is application/x-gzip-compressed the standard MIME type for Gzip files?

No, it is widely supported but considered a legacy or compatibility type. The official IANA standard is now application/gzip. However, many older servers and browsers still rely on application/x-gzip-compressed or application/x-gzip to identify these files correctly.

How do I open a file with the application/x-gzip-compressed type?

You need file extraction software such as 7-Zip, WinRAR, or the built-in gunzip utility on Linux and macOS. If the file ends in .tgz, extracting it will usually result in a TAR file, which contains multiple files and folders.

What is the difference between .gz and .tgz files?

A .gz file typically contains a single compressed file, while a .tgz file is a TAR archive compressed with Gzip. A .tgz file (short for .tar.gz) allows you to bundle an entire directory structure into one file, which is common for software distribution on Linux.

How do I configure Apache to serve files with this MIME type?

You can ensure your server recognizes these extensions by adding a directive to your .htaccess or configuration file. Use the line: AddType application/x-gzip-compressed .gz .tgz. This ensures browsers understand the file is a binary archive intended for download.

What is an .emz file associated with this MIME type?

An .emz file is a Compressed Enhanced Metafile, often used by Microsoft Office applications like Visio and Word. It is simply a standard EMF image compressed with Gzip. You can often rename the extension to .gz, unzip it, and view the resulting .emf image.

Why does my browser download the file instead of displaying it?

Browsers interpret application/x-gzip-compressed as a binary format that they cannot render natively. Unlike images or text, the browser treats this type as a generic file download, prompting you to save it to your disk.

Is this MIME type the same as HTTP Content-Encoding: gzip?

No, they serve different purposes. Content-Encoding: gzip tells the browser that a page (like HTML) was compressed for transfer and should be inflated immediately for viewing. The MIME type application/x-gzip-compressed indicates that the file itself is a Gzip archive that should remain compressed when saved.

General FAQ

What is a MIME type?

A MIME (Multipurpose Internet Mail Extensions) type is a standard that indicates the nature and format of a document, file, or assortment of bytes. MIME types are defined and standardized in IETF's RFC 6838.

MIME types are important because they help browsers and servers understand how to process a file. When a browser receives a file from a server, it uses the MIME type to determine how to display or handle the content, whether it's an image to display, a PDF to open in a viewer, or a video to play.

MIME types consist of a type and a subtype, separated by a slash (e.g., text/html, image/jpeg, application/pdf). Some MIME types also include optional parameters.

How do I find the MIME type for a file?

You can check the file extension or use a file identification tool such as file --mime-type on the command line. Many programming languages also provide libraries to detect MIME types.

Why are multiple MIME types listed for one extension?

Different applications and historical conventions may use alternative MIME identifiers for the same kind of file. Showing them all helps ensure compatibility across systems.