main
Raw Download raw file
 1export default function GZheader() {
 2  /* true if compressed data believed to be text */
 3  this.text       = 0;
 4  /* modification time */
 5  this.time       = 0;
 6  /* extra flags (not used when writing a gzip file) */
 7  this.xflags     = 0;
 8  /* operating system */
 9  this.os         = 0;
10  /* pointer to extra field or Z_NULL if none */
11  this.extra      = null;
12  /* extra field length (valid if extra != Z_NULL) */
13  this.extra_len  = 0; // Actually, we don't need it in JS,
14                       // but leave for few code modifications
15
16  //
17  // Setup limits is not necessary because in js we should not preallocate memory
18  // for inflate use constant limit in 65536 bytes
19  //
20
21  /* space at extra (only when reading header) */
22  // this.extra_max  = 0;
23  /* pointer to zero-terminated file name or Z_NULL */
24  this.name       = '';
25  /* space at name (only when reading header) */
26  // this.name_max   = 0;
27  /* pointer to zero-terminated comment or Z_NULL */
28  this.comment    = '';
29  /* space at comment (only when reading header) */
30  // this.comm_max   = 0;
31  /* true if there was or will be a header crc */
32  this.hcrc       = 0;
33  /* true when done reading gzip header (not used when writing a gzip file) */
34  this.done       = false;
35}