summaryrefslogtreecommitdiff
path: root/docs/classes/zippassthrough.md
blob: 1c0d27db85195568ef392eab3b1b79a9bfbaa2cf (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Class: ZipPassThrough

A pass-through stream to keep data uncompressed in a ZIP archive.

## Hierarchy

* **ZipPassThrough**

## Implements

* [ZipInputFile](../interfaces/zipinputfile.md)

## Index

### Constructors

* [constructor](zippassthrough.md#constructor)

### Properties

* [attrs](zippassthrough.md#attrs)
* [comment](zippassthrough.md#comment)
* [compression](zippassthrough.md#compression)
* [crc](zippassthrough.md#crc)
* [extra](zippassthrough.md#extra)
* [filename](zippassthrough.md#filename)
* [mtime](zippassthrough.md#mtime)
* [ondata](zippassthrough.md#ondata)
* [os](zippassthrough.md#os)
* [size](zippassthrough.md#size)

### Methods

* [push](zippassthrough.md#push)

## Constructors

### constructor

\+ **new ZipPassThrough**(`filename`: string): [ZipPassThrough](zippassthrough.md)

Creates a pass-through stream that can be added to ZIP archives

#### Parameters:

Name | Type | Description |
------ | ------ | ------ |
`filename` | string | The filename to associate with this data stream  |

**Returns:** [ZipPassThrough](zippassthrough.md)

## Properties

### attrs

• `Optional` **attrs**: number

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[attrs](../interfaces/zipinputfile.md#attrs)*

___

### comment

• `Optional` **comment**: string

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[comment](../interfaces/zipinputfile.md#comment)*

___

### compression

•  **compression**: number

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[compression](../interfaces/zipinputfile.md#compression)*

___

### crc

•  **crc**: number

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[crc](../interfaces/zipinputfile.md#crc)*

___

### extra

• `Optional` **extra**: Record\<number, Uint8Array>

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[extra](../interfaces/zipinputfile.md#extra)*

___

### filename

•  **filename**: string

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[filename](../interfaces/zipinputfile.md#filename)*

___

### mtime

• `Optional` **mtime**: GzipOptions[\"mtime\"]

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[mtime](../interfaces/zipinputfile.md#mtime)*

___

### ondata

•  **ondata**: [AsyncFlateStreamHandler](../README.md#asyncflatestreamhandler)

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[ondata](../interfaces/zipinputfile.md#ondata)*

___

### os

• `Optional` **os**: number

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[os](../interfaces/zipinputfile.md#os)*

___

### size

•  **size**: number

*Implementation of [ZipInputFile](../interfaces/zipinputfile.md).[size](../interfaces/zipinputfile.md#size)*

## Methods

### push

▸ **push**(`chunk`: Uint8Array, `final?`: boolean): void

Pushes a chunk to be added. If you are subclassing this with a custom
compression algorithm, note that you must push data from the source
file only, pre-compression.

#### Parameters:

Name | Type | Description |
------ | ------ | ------ |
`chunk` | Uint8Array | The chunk to push |
`final?` | boolean | Whether this is the last chunk  |

**Returns:** void