The file is not a well-formed package: bad magic, truncated, malformed directory or media.
import { decodePackage, PackageFormatError } from '@datamoc/mwg/mwl';await decodePackage(new Uint8Array(8)).catch((error) => console.log(error instanceof PackageFormatError)); // true Copy
import { decodePackage, PackageFormatError } from '@datamoc/mwg/mwl';await decodePackage(new Uint8Array(8)).catch((error) => console.log(error instanceof PackageFormatError)); // true
The file is not a well-formed package: bad magic, truncated, malformed directory or media.
Example