Upload via GUI (7543 Dateien)

This commit is contained in:
2026-10-22 07:01:41 +00:00
parent 8d29040b57
commit 54baf9b874
50 changed files with 2264 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.binary = void 0;
exports.encode = encode;
exports.decode = decode;
exports.is = is;
const index_js_1 = require("../bytes/index.js");
function encode(data) {
const bytes = (0, index_js_1.toUint8Array)(data);
let result = "";
for (const byte of bytes) {
result += String.fromCharCode(byte);
}
return result;
}
function decode(text) {
const result = new Uint8Array(text.length);
for (let i = 0; i < text.length; i++) {
result[i] = text.charCodeAt(i) & 0xff;
}
return result;
}
function is(text) {
return typeof text === "string";
}
exports.binary = { encode, decode, is };