Decides whether bytes are an instrument ROM image, which a package must never carry. The answer is a registered digest, a .rom extension, or an exact ROM size with no recognised format signature and no text in it. null means nothing suggests a ROM.
.rom
null
import { detectRomImage } from '@datamoc/mwg/mwl';const refusal = await detectRomImage(new Uint8Array(65536).fill(0xa5), 'pcm.bin');console.log(refusal?.reason); // 'size' Copy
import { detectRomImage } from '@datamoc/mwg/mwl';const refusal = await detectRomImage(new Uint8Array(65536).fill(0xa5), 'pcm.bin');console.log(refusal?.reason); // 'size'
Decides whether bytes are an instrument ROM image, which a package must never carry. The answer is a registered digest, a
.romextension, or an exact ROM size with no recognised format signature and no text in it.nullmeans nothing suggests a ROM.