5 extern void check_header_gzip(int src_fd)
13 unsigned char xtra_flags;
14 unsigned char os_flags;
18 xread_all(src_fd, header.raw, 8);
20 /* Check the compression method */
21 if (header.formated.method != 8) {
22 error_msg_and_die("Unknown compression method %d",
23 header.formated.method);
26 if (header.formated.flags & 0x04) {
27 /* bit 2 set: extra field present */
28 unsigned char extra_short;
30 extra_short = xread_char(src_fd) + (xread_char(src_fd) << 8);
31 while (extra_short > 0) {
32 /* Ignore extra field */
38 /* Discard original name if any */
39 if (header.formated.flags & 0x08) {
40 /* bit 3 set: original file name present */
41 while(xread_char(src_fd) != 0);
44 /* Discard file comment if any */
45 if (header.formated.flags & 0x10) {
46 /* bit 4 set: file comment present */
47 while(xread_char(src_fd) != 0);
50 /* Read the header checksum */
51 if (header.formated.flags & 0x02) {