
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
protobuf-decode
Advanced tools
extremely light-weight protobuf decode module, no larger than 5kB
Javascript version protobuf decoder. Aim: light-weight, file size no larger than 5kB. Just decode simple structs.
We don't use .proto file, instead, we use a JSON formatted message description, basically the same as protobuf.js json format.
To decode a protobuf, first you need to use build()
method to build the message package,
this step will automatically detect embedded message dependencies and handle them for furthur use.
Then, you can pick your message from the result of first step to actually decode a byte array. This process shoud be like:
import protobuf from './protobuf';
import msgPackage from './msg_struct';
// build the messages package
const builders = protobuf.build(msgPackage),
builder = builders.HistoryData;
// decode using message builder
protobuf.decode(byteArr, builder)
It's written in es6 style code, so you need to npm install babel-node. To test, you can run:
babel-node --presets es2015 test.js
FAQs
extremely light-weight protobuf decode module, no larger than 5kB
We found that protobuf-decode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.