MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / blobFromBytes

Function blobFromBytes

src/pkg/utils/encoding.test.ts:4–5  ·  view source on GitHub ↗
(bytes: Uint8Array)

Source from the content-addressed store, hash-verified

2import { bytesDecode, decodeUTF32, parseCharsetFromContentType, readRawContent } from "./encoding";
3
4const blobFromBytes = (bytes: Uint8Array) =>
5 new Blob([bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength) as ArrayBuffer]);
6
7const expectReadBlobContentDecodesAs = async (
8 bytes: Uint8Array,

Callers 2

encoding.test.tsFile · 0.85

Calls 1

sliceMethod · 0.45

Tested by

no test coverage detected