Update: 更新ampy

This commit is contained in:
王立帮
2024-08-17 23:59:17 +08:00
parent 29f15dd7d4
commit edce8ed5bc
8 changed files with 46 additions and 34 deletions

View File

@@ -5,6 +5,17 @@ goog.provide('Mixly.Ampy');
class Ampy {
constructor() {}
unhexlify(hexString) {
if (hexString.length % 2 !== 0) {
hexString = hexString + '0';
}
let bytes = [];
for (let c = 0; c < hexString.length; c += 2) {
bytes.push(parseInt(hexString.substr(c, 2), 16));
}
return new Uint8Array(bytes);
}
async get() {}
async ls() {}
async mkdir() {}