Splats · function

unbundleSog

Unpack a bundled .sog, which is a ZIP with every file at the root.

Explained in Gaussian splats.

function unbundleSog(bundle: ArrayBuffer): Promise<Map<string, Uint8Array>>
import { unbundleSog } from '@driftengine/splats';

Parameters

ParameterTypeDescription
bundleArrayBuffer

In depth

Read through the central directory and never through the local headers, and that is not defensive: splat-transform writes its entries streaming, so bit 3 of the general-purpose flags is set and every local header carries a compressed size of zero with the real sizes in a data descriptor after the payload. A reader that trusted the local header would extract nothing from every file a capture tool has produced. Measured on a file that tool wrote: flags 0x808, sizes zero in the local header and correct in the central directory.

Only the two methods the format can produce: stored, which is what splat-transform writes because the images are already compressed, and deflate, through DecompressionStream.