@cloudpss/compress 0.4.6 → 0.4.7
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/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** 可用的压缩算法 */
|
|
2
|
-
export
|
|
2
|
+
export type CompressionAlgorithm = 'zstd' | 'gzip' | 'none';
|
|
3
3
|
/** 压缩算法的魔数 */
|
|
4
4
|
export declare const MAGIC_NUMBERS: {
|
|
5
5
|
zstd: number[];
|
|
@@ -8,7 +8,7 @@ export declare const MAGIC_NUMBERS: {
|
|
|
8
8
|
/** 使用指定算法压缩 */
|
|
9
9
|
export declare function compress(data: Uint8Array, algorithm?: CompressionAlgorithm): CompressionResult;
|
|
10
10
|
/** 压缩/解压缩结果 */
|
|
11
|
-
export
|
|
11
|
+
export type CompressionResult = Promise<Uint8Array> & {
|
|
12
12
|
algorithm: CompressionAlgorithm;
|
|
13
13
|
};
|
|
14
14
|
/** 探测压缩算法 */
|