2026-10-06 22:12:49 +00:00
|
|
|
// Module ID: 1235
|
|
|
|
|
// Function ID: 1236
|
2026-09-18 20:18:48 +00:00
|
|
|
// Name: ProtoUtils
|
2026-10-06 22:12:49 +00:00
|
|
|
// Dependencies: [1199, 2]
|
2026-09-18 20:18:48 +00:00
|
|
|
// Exports: b64ToProto, protoToB64
|
|
|
|
|
|
2026-10-06 22:12:49 +00:00
|
|
|
// Module 1235 (ProtoUtils)
|
|
|
|
|
import _mod1199 from "module_1199" /* 1199 */;
|
2026-09-18 20:18:48 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
|
|
|
|
|
|
|
|
|
const BINARY_READ_OPTIONS = {
|
2026-10-06 22:12:49 +00:00
|
|
|
readerFactory(buf) {
|
|
|
|
|
const BinaryReader = _mod1199.BinaryReader;
|
2026-09-18 20:18:48 +00:00
|
|
|
const textDecoder = new TextDecoder("utf-8");
|
2026-10-06 22:12:49 +00:00
|
|
|
const binaryReader = new BinaryReader(buf, textDecoder);
|
2026-09-18 20:18:48 +00:00
|
|
|
return binaryReader;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
const result = size.fileFinishedImporting("utils/ProtoUtils.tsx");
|
|
|
|
|
|
|
|
|
|
export { BINARY_READ_OPTIONS };
|
|
|
|
|
export const b64ToProto = function b64ToProto(fromBinary, actionData) {
|
|
|
|
|
let fromBinaryResult = null;
|
|
|
|
|
if (null != actionData) {
|
2026-10-06 22:12:49 +00:00
|
|
|
fromBinary = fromBinary.fromBinary;
|
|
|
|
|
const obj = _mod1199;
|
|
|
|
|
fromBinaryResult = fromBinary(obj.base64decode(actionData), obj);
|
2026-09-18 20:18:48 +00:00
|
|
|
}
|
|
|
|
|
return fromBinaryResult;
|
|
|
|
|
};
|
|
|
|
|
export const protoToB64 = function protoToB64(toBinary, favoriteGifs) {
|
2026-10-06 22:12:49 +00:00
|
|
|
const obj = _mod1199;
|
|
|
|
|
return obj.base64encode(toBinary.toBinary(favoriteGifs));
|
2026-09-18 20:18:48 +00:00
|
|
|
};
|