
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
multicodec
Advanced tools
JavaScript implementation of the multicodec specification
> npm install multicodec
const multicodec = require('multicodec')
const prefixedProtobuf = multicodec.addPrefix('protobuf', protobufBuffer)
// prefixedProtobuf 0x50...
// The multicodec codec values can be accessed directly:
console.log(multicodec.DAG_CBOR)
// 113
// To get the string representation of a codec, e.g. for error messages:
console.log(multicodec.getNameFromCode(113))
// dag-cbor
https://multiformats.github.io/js-multicodec/
Updating the lookup table is done with a script. The source of truth is the multicodec default table. Update the table with running:
npm run update-table
Contributions welcome. Please check out the issues.
Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to multiformats are subject to the IPFS Code of Conduct.
Small note: If editing the README, please conform to the standard-readme specification.
MIT © 2016 Protocol Labs Inc.
The multihashes package is used for creating and working with self-describing hashes. It is similar to multicodec in that it provides a way to handle multiple formats in a consistent manner, but it is specifically focused on hash functions.
The multibase package is used for encoding and decoding data in various base encodings. It is similar to multicodec in that it provides a way to handle multiple formats, but it is specifically focused on base encodings.
The multiformats package is a collection of self-describing formats including multibase, multihash, and multicodec. It provides a unified interface for working with these formats, making it a more comprehensive solution compared to using multicodec alone.
FAQs
JavaScript implementation of the multicodec specification
The npm package multicodec receives a total of 287,981 weekly downloads. As such, multicodec popularity was classified as popular.
We found that multicodec demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.