Skip to content
QuaLix
On this page

Quack & QPK bundling

Configure @quajs/qualix/quack in @quajs/quack asset pipelines to bundle QLX streams inside QPK packages while preserving logical paths.

@quajs/qualix/quack exports target-neutral Quack bundler helpers and plugins. When packaging QPK archives in QuaEngine, QuaLix processes single-track video assets by default into QLX bitstreams while preserving existing logical asset paths.

Default bundling & explicit configuration

TypeScript
import { defineConfig } from '@quajs/quack'import { QuaLixPlugin } from '@quajs/qualix/quack'export default defineConfig({ source: './assets', output: './dist/game.qpk', format: 'qpk', // Optional: customize default QLX encoding or disable with `qualixVideo: false` qualixVideo: { mode: 'vbr', bitrate: '1.5M', keyInterval: 24, }, // Or attach per-folder rules via an ordinary Quack plugin: plugins: [ new QuaLixPlugin({ mode: 'lossless', paths: ['ui-fx'] }), ],})

Muxed-audio passthrough & path preservation

  • Automatic muxed-audio passthrough: Because QLX carries a single video track, implicit default bundling passes through containers containing an audio stream (allowPassthroughWithAudio: true by default unless stripAudio: true is configured).
  • Logical path stability: rewriteExtension defaults to false, updating mimeType (video/x-qualix) and mediaMetadata (width, height, fps, duration, codec: 'qlx') so existing script and scene asset names continue to resolve identically.

Zero-copy QPK slicing & C static embedding (solidify)

Every QLX stream starts at byte 0 of its own member:

  • Direct QPK reads: Native hosts may pass unaligned read-only QPK slices straight to qlx_open (member < 4 GiB for QPK v1), while Web Workers stream via openReader at (memberOffset, memberLength).
  • qualix solidify: Bake critical openings into read-only C constants when building self-contained native executables:
Shell
target/release/qualix solidify intro.qlx asset.c introcc -O2 -Iinclude examples/baked.c asset.c target/release/libqualix_decoder.a -o baked./baked