unreal.js
Version:
A pak reader for games like VALORANT & Fortnite written in Node.JS
72 lines (71 loc) • 1.89 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FChunkInfo = void 0;
const Guid_1 = require("../../objects/core/misc/Guid");
/**
* FChunkInfo
*/
class FChunkInfo {
/**
* Creates an instance using values
* @param {FGuid} guid Guid to use
* @param {number} hash Hash to use
* @param {Buffer} shaHash SHA-Hash to use
* @param {number} groupNumber Group number to use
* @param {number} windowSize Window size to use
* @param {number} fileSize File size to use
* @constructor
* @public
*/
constructor(guid, hash, shaHash, groupNumber, windowSize, fileSize) {
/**
* Guid
* @type {FGuid}
* @public
*/
this.guid = new Guid_1.FGuid();
/**
* Hash
* @type {number}
* @public
*/
this.hash = 0;
/**
* SHA-Hash
* @type {Buffer}
* @public
*/
this.shaHash = Buffer.alloc(0);
/**
* Group number
* @type {number}
* @public
*/
this.groupNumber = 0;
/**
* Window size
* @type {number}
* @public
*/
this.windowSize = 0;
/**
* File size
* @type {number}
* @public
*/
this.fileSize = 0;
if (guid != null)
this.guid = guid;
if (hash != null)
this.hash = hash;
if (shaHash != null)
this.shaHash = shaHash;
if (groupNumber != null)
this.groupNumber = groupNumber;
if (windowSize != null)
this.windowSize = windowSize;
if (fileSize != null)
this.fileSize = fileSize;
}
}
exports.FChunkInfo = FChunkInfo;