-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
41 lines (36 loc) · 855 Bytes
/
types.ts
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
export interface IPakFile extends IFileFooter {
index: IIndex;
}
export interface IFileFooter {
archiveVersion: number;
magic: string;
indexOffset: bigint;
indexSize: bigint;
indexHash: string;
}
export interface IIndex {
mountPoint: string;
mountPointSize: number;
recordCount: number;
records: IIndexRecord[];
}
export interface IIndexRecord extends IRecord {
fileName: string;
}
export interface IRecord {
offset: number;
size: number;
rawSize: number;
compressionMethod: number;
hash: string;
/**
* Encryption status of the file: `0` for unencrypted, `1` for encrypted
*/
isEncrypted: number;
compressionBlockSize: number;
compression: ICompression;
}
interface ICompression {
blockCount: number;
blocks: {startBlock: number, endBlock: number}[]
}