// encode_dto_apply.js // // applyEncodeDTO(encoder, dto): applies an encode DTO (built by buildEncodeDTO in // index.html) to a BasisEncoder instance, in the SAME ORDER as the legacy inline // encode path; the caller then calls encoder.encode(). // // PURE: depends only on (encoder, dto) -- no Module, no DOM. That's why it can run // unchanged on the main thread (non-worker DTO path) AND inside the encode worker // (which importScripts() this file). All enum values in dto are already ints. // // Loaded on the page via