Tool to easily analyze, compress and decompress your files using the GZIP compression process. Reduce the size of your data for storage and web transfer. Free and secure online service.
GZIP Compression - dCode
Tag(s) : Compression
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
GZIP is a free compression software that implements the Deflate algorithm.
The term gzip also refers to the compressed file format standardized by RFC 1952.
The gzip software applies the Deflate compression algorithm to a file:
— Search for repeated sequences using LZ77
— Statistical encoding using Huffman
— Encapsulation of the compressed stream in a gzip container (header, metadata, CRC32)
This process reduces file size without loss and facilitates transfer or storage.
Decompressing a .gz file involves reading the GZIP header and then decoding the compressed stream into Deflate format.
This stream combines LZ77 (references to previous sequences) and Huffman coding (statistical representation of symbols).
Once the stream is reconstructed, GZIP verifies data integrity using a CRC32 check and the original file size before restoring the original file.
Deflate: compression algorithm (RFC 1951)
Zlib: software library (RFC 1950) implementing Deflate and facilitating its integration into programs
GZIP: software and file format (RFC 1952) using Zlib, and therefore Deflate, to compress data
In summary: Deflate is the algorithm, Zlib the library, and GZIP the format and tool.
Use this dCode page or the gzip software with the command gzip file.txt
This creates a compressed file named file.txt.gz
The user can adjust the compression level (from 1 to 9) according to their needs, balancing speed and efficiency.
Use this dCode page or the gzip software with the command gzip -d file.txt.gz
A GZIP file always begins with the magic signature 1F8B (in hexadecimal).
The header contains (among others):
— The format identifier (1F 8B)
— The compression code (08 = Deflate)
— The modification date
— The original filename (optional)
Example: A filename typically begins with 1f 8b 08 00, and if it is followed by 8d 7c 6b 5a, then its modification date is 0x5a6b7c8d, which corresponds to the timestamp 1516993677 (2018-01-26 19:07:57)
Gzipped files generally have the extension .gz
A data integrity check is performed using CRC32.
The GZIP software was developed in 1992 by Jean-Loup Gailly and Mark Adler.
It was created to replace compress, which was based on LZW, an algorithm that was then patented.
.tar.gz (or .tgz) files are tar archives (created using the tar command) that are then compressed with GZIP.
The first layer (tar) groups several files into a single block, and the second layer (gzip) reduces the overall size.
These files, called tarballs, are widely used in UNIX/Linux systems for distributing software.
Its simplicity, universal compatibility, and open-source license make GZIP an essential standard.
Web servers, browsers, software libraries, and data pipelines integrate GZIP by default, ensuring maximum interoperability despite the existence of newer and more efficient formats.
dCode retains ownership of the "GZIP Compression" source code. Any algorithm for the "GZIP Compression" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "GZIP Compression" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "GZIP Compression" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
 Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
 
The content of the page "GZIP Compression" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: 
In a scientific article or book, the recommended bibliographic citation is: GZIP Compression on dCode.fr [online website], retrieved on 2025-11-04,