This commit is contained in:
2026-08-25 11:06:27 +08:00
parent e2fe23e792
commit 351fb15d69
10 changed files with 673 additions and 450 deletions
+26
View File
@@ -0,0 +1,26 @@
export default Base62;
/**
* Base62 编码解码类
*/
declare class Base62 {
/**
* @param {string} alphabet 62 位编码字母表
*/
constructor(alphabet: string);
/** @type {string[]} */
encodeTable: string[];
/** @type {Uint8Array} */
decodeMap: Uint8Array;
/**
* 将字符串编码为 Base62 字符串
* @param {string} src
* @returns {string}
*/
encode(src: string): string;
/**
* 将 Base62 字符串解码为原始字符串
* @param {string} src
* @returns {string}
*/
decode(src: string): string;
}