You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,7 @@ After UTF-8 encoding, `metadataPath` must be at most `0xffff` bytes in length.
67
67
mode:stats.mode,
68
68
compress:true,
69
69
forceZip64Format:false,
70
+
extraFields: [],
70
71
fileComment:"", // or a UTF-8 Buffer
71
72
}
72
73
```
@@ -85,6 +86,8 @@ If `forceZip64Format` is `true`, yazl will use ZIP64 format in this entry's Data
85
86
and Central Directory Record regardless of if it's required or not (this may be useful for testing.).
86
87
Otherwise, yazl will use ZIP64 format where necessary.
87
88
89
+
Each entry in `extraFields` should be tagged data of the form `{id: id, data: data}`. See the [`yauzl` docs](https://github.com/thejoshwolfe/yauzl#extrafields) for more.
90
+
88
91
If `fileComment` is a `string`, it will be encoded with UTF-8.
89
92
If `fileComment` is a `Buffer`, it should be a UTF-8 encoded string.
90
93
In UTF-8, `fileComment` must be at most `0xffff` bytes in length.
@@ -107,12 +110,13 @@ See `addFile()` for info about the `metadataPath` parameter.
107
110
mode:0o100664,
108
111
compress:true,
109
112
forceZip64Format:false,
113
+
extraFields: [],
110
114
fileComment:"", // or a UTF-8 Buffer
111
115
size:12345, // example value
112
116
}
113
117
```
114
118
115
-
See `addFile()` for the meaning of `mtime`, `mode`, `compress`, `forceZip64Format`, and `fileComment`.
119
+
See `addFile()` for the meaning of `mtime`, `mode`, `compress`, `forceZip64Format`, `extraFields`, and `fileComment`.
116
120
If `size` is given, it will be checked against the actual number of bytes in the `readStream`,
117
121
and an error will be emitted if there is a mismatch.
118
122
@@ -132,11 +136,12 @@ See `addFile()` for info about the `metadataPath` parameter.
132
136
mode:0o100664,
133
137
compress:true,
134
138
forceZip64Format:false,
139
+
extraFields: [],
135
140
fileComment:"", // or a UTF-8 Buffer
136
141
}
137
142
```
138
143
139
-
See `addFile()` for the meaning of `mtime`, `mode`, `compress`, `forceZip64Format`, and `fileComment`.
144
+
See `addFile()` for the meaning of `mtime`, `mode`, `compress`, `forceZip64Format`, `extraFields`, and `fileComment`.
140
145
141
146
This method has the unique property that General Purpose Bit `3` will not be used in the Local File Header.
142
147
This doesn't matter for unzip implementations that conform to the Zip File Spec.
0 commit comments