import { Bytes } from "./rtmt"
var util= require('util');

const textEncoder = new util.TextEncoder()
const textDecoder = new util.TextDecoder("utf-8")

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

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