2018-08-27 12:30:50 +00:00
|
|
|
export default function GZheader() {
|
2018-08-14 12:11:49 +00:00
|
|
|
/* true if compressed data believed to be text */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.text = 0;
|
2018-08-14 12:11:49 +00:00
|
|
|
/* modification time */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.time = 0;
|
2018-08-14 12:11:49 +00:00
|
|
|
/* extra flags (not used when writing a gzip file) */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.xflags = 0;
|
2018-08-14 12:11:49 +00:00
|
|
|
/* operating system */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.os = 0;
|
2018-08-14 12:11:49 +00:00
|
|
|
/* pointer to extra field or Z_NULL if none */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.extra = null;
|
2018-08-14 12:11:49 +00:00
|
|
|
/* extra field length (valid if extra != Z_NULL) */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.extra_len = 0; // Actually, we don't need it in JS,
|
|
|
|
// but leave for few code modifications
|
2018-08-14 12:11:49 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Setup limits is not necessary because in js we should not preallocate memory
|
|
|
|
// for inflate use constant limit in 65536 bytes
|
|
|
|
//
|
|
|
|
|
|
|
|
/* space at extra (only when reading header) */
|
|
|
|
// this.extra_max = 0;
|
|
|
|
/* pointer to zero-terminated file name or Z_NULL */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.name = '';
|
2018-08-14 12:11:49 +00:00
|
|
|
/* space at name (only when reading header) */
|
|
|
|
// this.name_max = 0;
|
|
|
|
/* pointer to zero-terminated comment or Z_NULL */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.comment = '';
|
2018-08-14 12:11:49 +00:00
|
|
|
/* space at comment (only when reading header) */
|
|
|
|
// this.comm_max = 0;
|
|
|
|
/* true if there was or will be a header crc */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.hcrc = 0;
|
2018-08-14 12:11:49 +00:00
|
|
|
/* true when done reading gzip header (not used when writing a gzip file) */
|
2018-08-27 12:30:50 +00:00
|
|
|
this.done = false;
|
|
|
|
}
|