import * as tsplus_module_1 from "@tsplus/stdlib/collections/Chunk/single";
export function stringChunkFrom(bytes, charset) {
  // @ts-expect-error
  const decoder = new TextDecoder(charset);

  switch (charset) {
    case "us-ascii":
    case "iso-8859-1":
    case "utf-8":
    case "utf-16le":
      {
        return tsplus_module_1.single(decoder.decode(new Uint8Array(bytes)));
      }
  }
}
//# sourceMappingURL=stringChunkFrom.mjs.map