@push.rocks/smartarchive 5.0.0 → 5.0.1
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.
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.gziptools.d.ts +4 -0
- package/dist_ts/classes.gziptools.js +9 -18
- package/dist_ts/classes.smartarchive.d.ts +148 -51
- package/dist_ts/classes.smartarchive.js +450 -214
- package/dist_ts/classes.ziptools.js +20 -34
- package/dist_ts/interfaces.d.ts +4 -0
- package/package.json +1 -1
- package/readme.hints.md +69 -23
- package/readme.md +360 -274
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.gziptools.ts +8 -13
- package/ts/classes.smartarchive.ts +506 -232
- package/ts/classes.ziptools.ts +18 -31
- package/ts/interfaces.ts +5 -0
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/classes.gziptools.ts
CHANGED
|
@@ -118,26 +118,21 @@ export class GzipTools {
|
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* Compress data asynchronously
|
|
121
|
+
* Note: Uses sync version for Deno compatibility (fflate async uses Web Workers
|
|
122
|
+
* which have issues in Deno)
|
|
121
123
|
*/
|
|
122
124
|
public async compress(data: Buffer, level?: TCompressionLevel): Promise<Buffer> {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
plugins.fflate.gzip(data, options as plugins.fflate.AsyncGzipOptions, (err, result) => {
|
|
126
|
-
if (err) reject(err);
|
|
127
|
-
else resolve(Buffer.from(result));
|
|
128
|
-
});
|
|
129
|
-
});
|
|
125
|
+
// Use sync version wrapped in Promise for cross-runtime compatibility
|
|
126
|
+
return this.compressSync(data, level);
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
/**
|
|
133
130
|
* Decompress data asynchronously
|
|
131
|
+
* Note: Uses sync version for Deno compatibility (fflate async uses Web Workers
|
|
132
|
+
* which have issues in Deno)
|
|
134
133
|
*/
|
|
135
134
|
public async decompress(data: Buffer): Promise<Buffer> {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
if (err) reject(err);
|
|
139
|
-
else resolve(Buffer.from(result));
|
|
140
|
-
});
|
|
141
|
-
});
|
|
135
|
+
// Use sync version wrapped in Promise for cross-runtime compatibility
|
|
136
|
+
return this.decompressSync(data);
|
|
142
137
|
}
|
|
143
138
|
}
|