UNPKG

gulp-armapbo

Version:

The plugin for Gulp which allows to pack ArmA pbo files from sources.

34 lines (32 loc) 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const assert_1 = require("../util/assert"); const packingMethod_1 = require("./packingMethod"); class HeaderEntry { constructor(name, packingMethod, originalSize, timestamp) { this.reserved = 0; this.dataSize = 0; assert_1.Assert.isNotNull(name, 'name'); this.name = name; this._packingMethod = packingMethod; this.originalSize = originalSize; this.timestamp = timestamp; } static getSignatureEntry() { return new HeaderEntry('', packingMethod_1.PackingMethod.product, 0, 0); } static getBoundaryEntry() { return new HeaderEntry('', packingMethod_1.PackingMethod.uncompressed, 0, 0); } get packingMethod() { return this._packingMethod; } getSize() { return this.name.length + 21; //name.length + 1 zero separator + 5 fields of 4-byte integers } __fallbackToUncompressed() { this._packingMethod = packingMethod_1.PackingMethod.uncompressed; } } exports.HeaderEntry = HeaderEntry; //# sourceMappingURL=headerEntry.js.map