-
Notifications
You must be signed in to change notification settings - Fork 3
/
EntrySourceOptions.js
48 lines (43 loc) · 2.06 KB
/
EntrySourceOptions.js
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
import Options from "./Options.js";
import Constants from "../Constants.js";
import {DefaultDeflateDataProcessor, PassThroughDataProcessor} from "armarius-io";
const defaultDataProcessors = new Map();
defaultDataProcessors.set(Constants.COMPRESSION_METHOD_STORE, PassThroughDataProcessor);
defaultDataProcessors.set(Constants.COMPRESSION_METHOD_DEFLATE, DefaultDeflateDataProcessor);
/**
* @typedef {Object} EntrySourceOptionsObject
* @property {boolean} [forceUTF8FileName]
* @property {number} [compressionMethod]
* @property {boolean} [forceZIP64]
* @property {number} [minMadeByVersion]
* @property {number} [minExtractionVersion]
* @property {Date} [modTime]
* @property {Date} [acTime]
* @property {Date} [crTime]
* @property {boolean} [unicodeFileNameField]
* @property {boolean} [unicodeCommentField]
* @property {boolean} [extendedTimeStampField]
* @property {?string} [fileComment]
* @property {?string} [fileName]
* @property {number} [internalFileAttributes]
* @property {number} [externalFileAttributes]
* @property {Map<number, typeof DataProcessor>} [dataProcessors]
*/
export default class EntrySourceOptions extends Options {
/** @type {boolean} */ forceUTF8FileName = false;
/** @type {number} */ compressionMethod = Constants.COMPRESSION_METHOD_DEFLATE;
/** @type {boolean} */ forceZIP64 = false;
/** @type {number} */ minMadeByVersion = Constants.MIN_VERSION_DEFLATE;
/** @type {number} */ minExtractionVersion = Constants.MIN_VERSION_DEFLATE;
/** @type {?Date} */ modTime = new Date();
/** @type {?Date} */ acTime = new Date();
/** @type {?Date} */ crTime = new Date();
/** @type {boolean} */ unicodeFileNameField = false;
/** @type {boolean} */ unicodeCommentField = false;
/** @type {boolean} */ extendedTimeStampField = true;
/** @type {?string} */ fileComment = null;
/** @type {?string} */ fileName = null;
/** @type {number} */ internalFileAttributes = 0;
/** @type {number} */ externalFileAttributes = 0;
/** @type {Map<number, typeof DataProcessor>} */ dataProcessors = defaultDataProcessors;
}