@jamiephan/casclib 0.0.0-dev.4 → 0.0.0-dev.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,270 @@
1
+ import { CascStorageBinding } from './bindings';
2
+ /**
3
+ * CascLib Storage wrapper class
4
+ * Provides methods to interact with CASC storage archives
5
+ */
6
+ export class Storage {
7
+ constructor() {
8
+ this.storage = new CascStorageBinding();
9
+ }
10
+ /**
11
+ * Open a CASC storage at the specified path
12
+ * @param path - Path to the CASC storage directory
13
+ * @param options - Optional opening options
14
+ */
15
+ open(path, options) {
16
+ this.storage.CascOpenStorage(path, options?.flags || 0);
17
+ }
18
+ /**
19
+ * Open an online CASC storage
20
+ * @param path - Connection string in the format: `local_cache_folder[*cdn_server_url]*code_name[*region]`
21
+ * - `local_cache_folder`: Local cache directory for downloaded game data (reusable)
22
+ * - Windows: `C:/Temp/CASC/Cache`
23
+ * - Linux: `/tmp/casc/cache`
24
+ * - `cdn_server_url`: Optional CDN server URL (e.g., "http://us.patch.battle.net:1119")
25
+ * - `code_name`: TACT product code (e.g., "hero" for Heroes of the Storm, "wow" for World of Warcraft)
26
+ * See https://wowdev.wiki/TACT for available product codes
27
+ * - `region`: Optional server region (e.g., "us", "eu", "kr", "tw", "cn")
28
+ * @param options - Optional opening options
29
+ * @example
30
+ * ```typescript
31
+ * // Windows - Basic usage with minimal parameters
32
+ * storage.openOnline('C:/Temp/CASC/Cache*hero');
33
+ *
34
+ * // Linux - Basic usage
35
+ * storage.openOnline('/tmp/casc/cache*hero');
36
+ *
37
+ * // With CDN server specified
38
+ * storage.openOnline('C:/Temp/CASC/Cache*http://us.patch.battle.net:1119*hero');
39
+ *
40
+ * // With region specified
41
+ * storage.openOnline('/tmp/casc/cache*hero*us');
42
+ *
43
+ * // Full format with all parameters
44
+ * storage.openOnline('C:/Temp/CASC/Cache*http://us.patch.battle.net:1119*hero*us');
45
+ * ```
46
+ */
47
+ openOnline(path, options) {
48
+ this.storage.CascOpenOnlineStorage(path, options?.flags || 0);
49
+ }
50
+ /**
51
+ * Open a CASC storage with extended parameters (CascOpenStorageEx)
52
+ * @param params - Path or parameter string
53
+ * @param options - Extended opening options
54
+ */
55
+ openEx(params, options) {
56
+ this.storage.CascOpenStorageEx(params, options);
57
+ }
58
+ /**
59
+ * Close the CASC storage
60
+ */
61
+ close() {
62
+ return this.storage.CascCloseStorage();
63
+ }
64
+ /**
65
+ * Open a file from the storage
66
+ * @param filename - Name of the file to open
67
+ * @param options - Optional opening options
68
+ * @returns A File object
69
+ */
70
+ openFile(filename, options) {
71
+ const file = this.storage.CascOpenFile(filename, options?.flags || 0);
72
+ return new File(file);
73
+ }
74
+ /**
75
+ * Get information about a file
76
+ * @param filename - Name of the file
77
+ * @returns File information or null if file doesn't exist
78
+ */
79
+ getFileInfo(filename) {
80
+ return this.storage.CascGetFileInfo(filename);
81
+ }
82
+ /**
83
+ * Check if a file exists in the storage
84
+ * @param filename - Name of the file
85
+ * @returns true if file exists, false otherwise
86
+ */
87
+ fileExists(filename) {
88
+ return this.storage.fileExists(filename);
89
+ }
90
+ /**
91
+ * Get storage information
92
+ * @param infoClass - The type of information to retrieve
93
+ * @returns Storage information object
94
+ */
95
+ getStorageInfo(infoClass) {
96
+ return this.storage.CascGetStorageInfo(infoClass);
97
+ }
98
+ /**
99
+ * Find the first file matching the mask
100
+ * @param mask - File mask (e.g., "*.txt")
101
+ * @param listFile - Optional list file path
102
+ * @returns Find data or null if no files found
103
+ */
104
+ findFirstFile(mask, listFile) {
105
+ return this.storage.CascFindFirstFile(mask, listFile);
106
+ }
107
+ /**
108
+ * Find the next file in the search
109
+ * @returns Find data or null if no more files
110
+ */
111
+ findNextFile() {
112
+ return this.storage.CascFindNextFile();
113
+ }
114
+ /**
115
+ * Close the current find operation
116
+ * @returns true if closed successfully
117
+ */
118
+ findClose() {
119
+ return this.storage.CascFindClose();
120
+ }
121
+ /**
122
+ * Add an encryption key to the storage
123
+ * @param keyName - Name/ID of the key
124
+ * @param key - Key data as Buffer
125
+ * @returns true if added successfully
126
+ */
127
+ addEncryptionKey(keyName, key) {
128
+ return this.storage.CascAddEncryptionKey(keyName, key);
129
+ }
130
+ /**
131
+ * Add an encryption key from a string
132
+ * @param keyName - Name/ID of the key
133
+ * @param keyStr - Key as string
134
+ * @returns true if added successfully
135
+ */
136
+ addStringEncryptionKey(keyName, keyStr) {
137
+ return this.storage.CascAddStringEncryptionKey(keyName, keyStr);
138
+ }
139
+ /**
140
+ * Import encryption keys from a string
141
+ * @param keyList - String containing key list
142
+ * @returns true if imported successfully
143
+ */
144
+ importKeysFromString(keyList) {
145
+ return this.storage.CascImportKeysFromString(keyList);
146
+ }
147
+ /**
148
+ * Import encryption keys from a file
149
+ * @param filePath - Path to the key file
150
+ * @returns true if imported successfully
151
+ */
152
+ importKeysFromFile(filePath) {
153
+ return this.storage.CascImportKeysFromFile(filePath);
154
+ }
155
+ /**
156
+ * Find an encryption key by name
157
+ * @param keyName - Name/ID of the key
158
+ * @returns Key data or null if not found
159
+ */
160
+ findEncryptionKey(keyName) {
161
+ return this.storage.CascFindEncryptionKey(keyName);
162
+ }
163
+ /**
164
+ * Get the name of an encryption key that was not found
165
+ * @returns Key name or null
166
+ */
167
+ getNotFoundEncryptionKey() {
168
+ return this.storage.CascGetNotFoundEncryptionKey();
169
+ }
170
+ }
171
+ /**
172
+ * CascLib File wrapper class
173
+ * Represents an open file in CASC storage
174
+ */
175
+ export class File {
176
+ constructor(file) {
177
+ this.file = file;
178
+ }
179
+ /**
180
+ * Read data from the file
181
+ * @param bytesToRead - Number of bytes to read (default: 4096)
182
+ * @returns Buffer containing the read data
183
+ */
184
+ read(bytesToRead) {
185
+ return this.file.CascReadFile(bytesToRead || 4096);
186
+ }
187
+ /**
188
+ * Read all data from the file
189
+ * @returns Buffer containing all file data
190
+ */
191
+ readAll() {
192
+ return this.file.readFileAll();
193
+ }
194
+ /**
195
+ * Get the file size (32-bit)
196
+ * @returns File size in bytes
197
+ */
198
+ getSize() {
199
+ return this.file.CascGetFileSize();
200
+ }
201
+ /**
202
+ * Get the file size (64-bit)
203
+ * @returns File size in bytes
204
+ */
205
+ getSize64() {
206
+ return this.file.CascGetFileSize64();
207
+ }
208
+ /**
209
+ * Get the current file position (32-bit)
210
+ * @returns Current position in bytes
211
+ */
212
+ getPosition() {
213
+ return this.file.CascGetFilePointer();
214
+ }
215
+ /**
216
+ * Get the current file position (64-bit)
217
+ * @returns Current position in bytes
218
+ */
219
+ getPosition64() {
220
+ return this.file.CascGetFilePointer64();
221
+ }
222
+ /**
223
+ * Set the file position (32-bit)
224
+ * @param position - New position in bytes
225
+ * @returns The new position
226
+ */
227
+ setPosition(position) {
228
+ return this.file.CascSetFilePointer(position);
229
+ }
230
+ /**
231
+ * Set the file position (64-bit)
232
+ * @param position - New position in bytes
233
+ * @param moveMethod - Move method (FILE_BEGIN, FILE_CURRENT, FILE_END)
234
+ * @returns The new position
235
+ */
236
+ setPosition64(position, moveMethod) {
237
+ return this.file.CascSetFilePointer64(position, moveMethod);
238
+ }
239
+ /**
240
+ * Get detailed file information
241
+ * @param infoClass - The type of information to retrieve
242
+ * @returns File information object
243
+ */
244
+ getFileInfo(infoClass) {
245
+ return this.file.CascGetFileInfo(infoClass);
246
+ }
247
+ /**
248
+ * Set file flags
249
+ * @param flags - Flags to set
250
+ * @returns true if set successfully
251
+ */
252
+ setFileFlags(flags) {
253
+ return this.file.CascSetFileFlags(flags);
254
+ }
255
+ /**
256
+ * Close the file
257
+ * @returns true if closed successfully
258
+ */
259
+ close() {
260
+ return this.file.CascCloseFile();
261
+ }
262
+ }
263
+ // Re-export everything from bindings
264
+ export * from './bindings';
265
+ // High-level exports
266
+ export default {
267
+ Storage,
268
+ File
269
+ };
270
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EASnB,M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cAAc,YAAY,CAAC;AAE3B,qBAAqB;AACrB,eAAe;IACb,OAAO;IACP,IAAI;CACL,CAAC"}
@@ -0,0 +1,229 @@
1
+ export declare enum CascStorageInfoClass {
2
+ LocalFileCount = 0,
3
+ TotalFileCount = 1,
4
+ Features = 2,
5
+ InstalledLocales = 3,
6
+ Product = 4,
7
+ Tags = 5,
8
+ PathProduct = 6
9
+ }
10
+ export declare enum CascFileInfoClass {
11
+ ContentKey = 0,
12
+ EncodedKey = 1,
13
+ FullInfo = 2,
14
+ SpanInfo = 3
15
+ }
16
+ export declare enum CascNameType {
17
+ Full = 0,
18
+ DataId = 1,
19
+ CKey = 2,
20
+ EKey = 3
21
+ }
22
+ export interface CascFindData {
23
+ fileName: string;
24
+ ckey: Buffer;
25
+ ekey: Buffer;
26
+ tagBitMask: number;
27
+ fileSize: number;
28
+ plainName: string | null;
29
+ fileDataId: number;
30
+ localeFlags: number;
31
+ contentFlags: number;
32
+ spanCount: number;
33
+ available: boolean;
34
+ nameType: CascNameType;
35
+ }
36
+ export interface CascStorageProduct {
37
+ codeName: string;
38
+ buildNumber: number;
39
+ }
40
+ export interface CascStorageInfo {
41
+ fileCount?: number;
42
+ features?: number;
43
+ codeName?: string;
44
+ buildNumber?: number;
45
+ }
46
+ export interface CascFileFullInfo {
47
+ ckey: Buffer;
48
+ ekey: Buffer;
49
+ dataFileName: string;
50
+ storageOffset: number;
51
+ segmentOffset: number;
52
+ tagBitMask: number;
53
+ fileNameHash: number;
54
+ contentSize: number;
55
+ encodedSize: number;
56
+ segmentIndex: number;
57
+ spanCount: number;
58
+ fileDataId: number;
59
+ localeFlags: number;
60
+ contentFlags: number;
61
+ }
62
+ export interface CascFileSpanInfo {
63
+ ckey: Buffer;
64
+ ekey: Buffer;
65
+ startOffset: number;
66
+ endOffset: number;
67
+ archiveIndex: number;
68
+ archiveOffs: number;
69
+ headerSize: number;
70
+ frameCount: number;
71
+ }
72
+ export interface CascFileInfoResult {
73
+ ckey?: Buffer;
74
+ ekey?: Buffer;
75
+ dataFileName?: string;
76
+ storageOffset?: number;
77
+ segmentOffset?: number;
78
+ tagBitMask?: number;
79
+ fileNameHash?: number;
80
+ contentSize?: number;
81
+ encodedSize?: number;
82
+ segmentIndex?: number;
83
+ spanCount?: number;
84
+ fileDataId?: number;
85
+ localeFlags?: number;
86
+ contentFlags?: number;
87
+ }
88
+ export interface CascOpenStorageExOptions {
89
+ localPath?: string;
90
+ codeName?: string;
91
+ region?: string;
92
+ localeMask?: number;
93
+ flags?: number;
94
+ buildKey?: string;
95
+ cdnHostUrl?: string;
96
+ online?: boolean;
97
+ }
98
+ export interface CascStorage {
99
+ CascOpenStorage(path: string, flags: number): boolean;
100
+ CascOpenOnlineStorage(path: string, flags: number): boolean;
101
+ CascOpenStorageEx(params: string, options?: CascOpenStorageExOptions): boolean;
102
+ CascCloseStorage(): boolean;
103
+ CascOpenFile(filename: string, flags: number): CascFile;
104
+ CascGetFileInfo(filename: string): {
105
+ name: string;
106
+ size: number;
107
+ } | null;
108
+ fileExists(filename: string): boolean;
109
+ CascGetStorageInfo(infoClass: number): CascStorageInfo;
110
+ CascFindFirstFile(mask?: string, listFile?: string): CascFindData | null;
111
+ CascFindNextFile(): CascFindData | null;
112
+ CascFindClose(): boolean;
113
+ CascAddEncryptionKey(keyName: number, key: Buffer): boolean;
114
+ CascAddStringEncryptionKey(keyName: number, keyStr: string): boolean;
115
+ CascImportKeysFromString(keyList: string): boolean;
116
+ CascImportKeysFromFile(filePath: string): boolean;
117
+ CascFindEncryptionKey(keyName: number): Buffer | null;
118
+ CascGetNotFoundEncryptionKey(): number | null;
119
+ }
120
+ export interface CascFile {
121
+ CascReadFile(bytesToRead: number): Buffer;
122
+ readFileAll(): Buffer;
123
+ CascGetFileSize(): number;
124
+ CascGetFileSize64(): number;
125
+ CascGetFilePointer(): number;
126
+ CascGetFilePointer64(): number;
127
+ CascSetFilePointer(position: number): number;
128
+ CascSetFilePointer64(position: number, moveMethod?: number): number;
129
+ CascGetFileInfo(infoClass: number): CascFileInfoResult;
130
+ CascSetFileFlags(flags: number): boolean;
131
+ CascCloseFile(): boolean;
132
+ }
133
+ export declare const CascStorageBinding: new () => CascStorage;
134
+ export declare const CascFileBinding: new () => CascFile;
135
+ export declare const CascOpenLocalFile: (filename: string, flags?: number) => CascFile;
136
+ export declare const GetCascError: () => number;
137
+ export declare const SetCascError: (error: number) => void;
138
+ export declare const CascCdnGetDefault: () => string | null;
139
+ export declare const CascCdnDownload: (cdnHostUrl: string, product: string, fileName: string) => Buffer | null;
140
+ export declare const CASCLIB_VERSION: number;
141
+ export declare const CASCLIB_VERSION_STRING: string;
142
+ export declare const FILE_BEGIN: number;
143
+ export declare const FILE_CURRENT: number;
144
+ export declare const FILE_END: number;
145
+ export declare const CASC_FILEID_FORMAT: string;
146
+ export declare const CASC_PARAM_SEPARATOR: string;
147
+ export declare const CascProgressLoadingFile: number;
148
+ export declare const CascProgressLoadingManifest: number;
149
+ export declare const CascProgressDownloadingFile: number;
150
+ export declare const CascProgressLoadingIndexes: number;
151
+ export declare const CascProgressDownloadingArchiveIndexes: number;
152
+ export declare const CASC_OPEN_BY_NAME: number;
153
+ export declare const CASC_OPEN_BY_CKEY: number;
154
+ export declare const CASC_OPEN_BY_EKEY: number;
155
+ export declare const CASC_OPEN_BY_FILEID: number;
156
+ export declare const CASC_OPEN_TYPE_MASK: number;
157
+ export declare const CASC_OPEN_FLAGS_MASK: number;
158
+ export declare const CASC_STRICT_DATA_CHECK: number;
159
+ export declare const CASC_OVERCOME_ENCRYPTED: number;
160
+ export declare const CASC_OPEN_CKEY_ONCE: number;
161
+ export declare const CASC_LOCALE_ALL: number;
162
+ export declare const CASC_LOCALE_ALL_WOW: number;
163
+ export declare const CASC_LOCALE_NONE: number;
164
+ export declare const CASC_LOCALE_UNKNOWN1: number;
165
+ export declare const CASC_LOCALE_ENUS: number;
166
+ export declare const CASC_LOCALE_KOKR: number;
167
+ export declare const CASC_LOCALE_RESERVED: number;
168
+ export declare const CASC_LOCALE_FRFR: number;
169
+ export declare const CASC_LOCALE_DEDE: number;
170
+ export declare const CASC_LOCALE_ZHCN: number;
171
+ export declare const CASC_LOCALE_ESES: number;
172
+ export declare const CASC_LOCALE_ZHTW: number;
173
+ export declare const CASC_LOCALE_ENGB: number;
174
+ export declare const CASC_LOCALE_ENCN: number;
175
+ export declare const CASC_LOCALE_ENTW: number;
176
+ export declare const CASC_LOCALE_ESMX: number;
177
+ export declare const CASC_LOCALE_RURU: number;
178
+ export declare const CASC_LOCALE_PTBR: number;
179
+ export declare const CASC_LOCALE_ITIT: number;
180
+ export declare const CASC_LOCALE_PTPT: number;
181
+ export declare const CASC_CFLAG_INSTALL: number;
182
+ export declare const CASC_CFLAG_LOAD_ON_WINDOWS: number;
183
+ export declare const CASC_CFLAG_LOAD_ON_MAC: number;
184
+ export declare const CASC_CFLAG_X86_32: number;
185
+ export declare const CASC_CFLAG_X86_64: number;
186
+ export declare const CASC_CFLAG_LOW_VIOLENCE: number;
187
+ export declare const CASC_CFLAG_DONT_LOAD: number;
188
+ export declare const CASC_CFLAG_UPDATE_PLUGIN: number;
189
+ export declare const CASC_CFLAG_ARM64: number;
190
+ export declare const CASC_CFLAG_ENCRYPTED: number;
191
+ export declare const CASC_CFLAG_NO_NAME_HASH: number;
192
+ export declare const CASC_CFLAG_UNCMN_RESOLUTION: number;
193
+ export declare const CASC_CFLAG_BUNDLE: number;
194
+ export declare const CASC_CFLAG_NO_COMPRESSION: number;
195
+ export declare const MD5_HASH_SIZE: number;
196
+ export declare const MD5_STRING_SIZE: number;
197
+ export declare const SHA1_HASH_SIZE: number;
198
+ export declare const SHA1_STRING_SIZE: number;
199
+ export declare const CASC_INVALID_INDEX: number;
200
+ export declare const CASC_INVALID_SIZE: number;
201
+ export declare const CASC_INVALID_POS: number;
202
+ export declare const CASC_INVALID_ID: number;
203
+ export declare const CASC_INVALID_OFFS64: number;
204
+ export declare const CASC_INVALID_SIZE64: number;
205
+ export declare const CascStorageLocalFileCount: number;
206
+ export declare const CascStorageTotalFileCount: number;
207
+ export declare const CascStorageFeatures: number;
208
+ export declare const CascStorageInstalledLocales: number;
209
+ export declare const CascStorageProduct: number;
210
+ export declare const CascStorageTags: number;
211
+ export declare const CascStoragePathProduct: number;
212
+ export declare const CascFileContentKey: number;
213
+ export declare const CascFileEncodedKey: number;
214
+ export declare const CascFileFullInfo: number;
215
+ export declare const CascFileSpanInfo: number;
216
+ export declare const CASC_FEATURE_FILE_NAMES: number;
217
+ export declare const CASC_FEATURE_ROOT_CKEY: number;
218
+ export declare const CASC_FEATURE_TAGS: number;
219
+ export declare const CASC_FEATURE_FNAME_HASHES: number;
220
+ export declare const CASC_FEATURE_FNAME_HASHES_OPTIONAL: number;
221
+ export declare const CASC_FEATURE_FILE_DATA_IDS: number;
222
+ export declare const CASC_FEATURE_LOCALE_FLAGS: number;
223
+ export declare const CASC_FEATURE_CONTENT_FLAGS: number;
224
+ export declare const CASC_FEATURE_DATA_ARCHIVES: number;
225
+ export declare const CASC_FEATURE_DATA_FILES: number;
226
+ export declare const CASC_FEATURE_ONLINE: number;
227
+ export declare const CASC_FEATURE_FORCE_DOWNLOAD: number;
228
+ export declare const CASC_KEY_LENGTH: number;
229
+ //# sourceMappingURL=bindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bindings.d.ts","sourceRoot":"","sources":["../../lib/bindings.ts"],"names":[],"mappings":"AAKA,oBAAY,oBAAoB;IAC9B,cAAc,IAAI;IAClB,cAAc,IAAI;IAClB,QAAQ,IAAI;IACZ,gBAAgB,IAAI;IACpB,OAAO,IAAI;IACX,IAAI,IAAI;IACR,WAAW,IAAI;CAChB;AAGD,oBAAY,iBAAiB;IAC3B,UAAU,IAAI;IACd,UAAU,IAAI;IACd,QAAQ,IAAI;IACZ,QAAQ,IAAI;CACb;AAGD,oBAAY,YAAY;IACtB,IAAI,IAAI;IACR,MAAM,IAAI;IACV,IAAI,IAAI;IACR,IAAI,IAAI;CACT;AAGD,MAAM,W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