首页Home › 编码与加密Encoding & Crypto
🗜️ Gzip 压缩解压Gzip Compress / Decompress
在线 Gzip 压缩和解压:文本压缩成 Base64 或十六进制,Gzip 数据还原成文本;也可以把任意文件压缩成 .gz 或解压 .gz 文件,全部在浏览器本地完成。Gzip-compress text to Base64 or hex and decompress Gzip data back to text, or compress any file to .gz and extract .gz files — all locally in your browser.
文件压缩 / 解压Compress / extract a file
使用说明与常见问题How-to & FAQ
「Gzip 压缩解压」是什么?What is the Gzip Compress / Decompress tool?
在线 Gzip 压缩和解压:文本压缩成 Base64 或十六进制,Gzip 数据还原成文本;也可以把任意文件压缩成 .gz 或解压 .gz 文件,全部在浏览器本地完成。Gzip-compress text to Base64 or hex and decompress Gzip data back to text, or compress any file to .gz and extract .gz files — all locally in your browser.
如何使用「Gzip 压缩解压」?How do I use the Gzip Compress / Decompress?
文本模式:选择「压缩」,输入文字即得到 Gzip 数据(Base64 或 Hex);选择「解压」,粘贴 Base64/Hex 格式的 Gzip 数据即可还原。文件模式:在下方选择文件,.gz 文件会自动解压,其他文件会压缩成 .gz 并下载。Text: choose Compress and type text to get Gzip data (Base64 or hex); choose Decompress and paste Base64/hex Gzip data to restore it. Files: pick a file below — .gz files are extracted, anything else is compressed to .gz for download.
Gzip 和 Zlib、Deflate 有什么区别?How is Gzip different from Zlib and Deflate?
三者用的是同一种 Deflate 压缩算法,只是外层包装不同:Gzip 以 1F 8B 开头并带 CRC32 校验,常用于 .gz 文件和 HTTP 压缩;Zlib 以 78 开头,常见于 PNG 和程序内部;Deflate 是没有包装的原始数据。All three use the same Deflate algorithm with different wrappers: Gzip starts with 1F 8B and carries a CRC32 (used by .gz files and HTTP), Zlib starts with 78 (PNG, many programs), and raw Deflate has no wrapper.
为什么短文本压缩后反而变大?Why does short text get bigger?
Gzip 有约 18 字节的文件头和校验,内容很短或没有重复时,压缩后可能比原文还大,这是正常现象。Gzip adds about 18 bytes of header and checksum, so very short or non-repetitive input can grow — that is normal.
「Gzip 压缩解压」免费吗?数据会上传吗?Is the Gzip Compress / Decompress free? Is my data uploaded?
「Gzip 压缩解压」完全免费,无需注册或安装,手机和电脑都能用;所有处理都在你的浏览器本地完成,输入的内容和文件不会上传到服务器。The Gzip Compress / Decompress is completely free with no sign-up or install and works on phones and desktops; everything runs locally in your browser and nothing you enter is uploaded.