MCPcopy Create free account
hub / github.com/melonjs/melonJS / decompress

Function decompress

packages/melonjs/src/utils/decode.ts:25–33  ·  view source on GitHub ↗
(data: string, format: string)

Source from the content-addressed store, hash-verified

23 * @returns Decoded and decompressed data
24 */
25export function decompress(data: string, format: string): Uint32Array {
26 if (typeof inflateFunction === "function") {
27 return inflateFunction(data, format);
28 } else {
29 throw new Error(
30 "No inflate function set — GZIP/ZLIB decompression not supported!",
31 );
32 }
33}
34
35/**
36 * Decode a CSV encoded array into a binary array

Callers 1

decodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected