Skip to content
pixi-silk
GitHub repository
Function

readBundle

import { readBundle } from 'pixi-silk/i18n';
function readBundle(buffer: ArrayBuffer, warn?: (message: string) => void): BundleData;

Reads a .silk bundle without copying: every table is a typed-array view over buffer, and only the string table is decoded. Throws SilkBundleError on a wrong magic, another major version, a truncated buffer or a misaligned section. A newer minor version calls warn.

Parameters#

ParameterTypeDefault value
bufferArrayBufferundefined
warn(message: string) => voidconsole.warn

Returns#

BundleData