gzip file header

| | Comments (0)

RFC 1952

把一個 gzip file 前 10 bytes dump 下來

1f 8b 08 00 b8 8e ea 3f 00 03
+---+---+---+---+---+---+---+---+---+---+
|ID1|ID2|CM |FLG| MTIME |XFL|OS |
+---+---+---+---+---+---+---+---+---+---+

ID1 ID2 固定是 1f 8b, 作為 gzip format 的識別
CM 是壓縮方式, 需填 08
FLG 是一些參數的 flag, 一般為 0, bit 5-7 reserved (Reserved FLG bits must be zero.)
MTIME 是最後異動時間, 單位秒, 相當於 date +%s
XFL 是其他參數, 一般為 0
OS = 03 = Unix

Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on June 24, 2004 10:19 PM.

[Shell] cat file was the previous entry in this blog.

Internet Domain Codes is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.