import { Bytes } from "./rtmt"
const textEncoder = new TextEncoder()
const textDecoder = new TextDecoder("utf-8")

export function encodeText(text : string) {
    const bytes = textEncoder.encode(text)
    return bytes
}

export function decodeText(bytes : Bytes) {
    return textDecoder.decode(bytes)
}