/** * Encoding helpers for the embedded asset tree (compiled binaries). * * The tree ships inside the bundled JS as `Record>`, * so binary siblings (.png, .woff2, .wasm, etc.) cannot be stored as raw bytes. * We base64-encode them with a NUL-prefixed sentinel so the runtime serve path * recognizes which entries are binary and decodes back to a Buffer before * writing the HTTP response. UTF-8 decoding the same bytes (the v1.29 first * pass) corrupts every binary asset. */ import { Buffer } from 'node:buffer'; export declare function isBinaryAssetExtension(ext: string): boolean; /** * Encode a file's bytes for inclusion in the embedded asset tree. Text * extensions stay as UTF-8 strings (cheap to template-literalize and * round-trip cleanly through `res.end(string)`). Binary extensions get * the sentinel + base64 treatment. */ export declare function encodeAssetForEmbed(content: Buffer, ext: string): string; /** * Decode an embedded asset value back into the bytes the runtime should * write to the response. Returns `{ buffer }` for binary entries and * `{ text }` for plain UTF-8. Callers pick `res.end(buffer)` or * `res.end(text)` accordingly so binary bytes round-trip unchanged. */ export declare function decodeEmbeddedAsset(value: string): { text?: string; buffer?: Buffer; }; //# sourceMappingURL=asset-encoding.d.ts.map