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