rawproto-wasm
v0.0.5
Published
Decode protobuf in raw form, in wasm (for node, deno, cf workers, etc.) Based on decode_raw.
Downloads
33
Readme
rawproto-wasm
Decode protobuf in raw form, in wasm (for node, deno, cf workers, etc.) Based on decode_raw, which is a rad CLI tool for looking at binary protobuf.
You can see a web-demo here
This has some ideas in common with rawproto, but marks a different direction that can parse a bit faster, and eventually handle partial parsing (mixing proto def with raw fields.)
usage
First intall it in your project:
npm i rawproto-wasm
Now, use it like this:
import { getString } from 'rawproto-wasm'
import { readFile } from 'fs/promises'
const binary = await readFile('test.bin')
console.log(getString(binary, '.2'))
dev
# build the module
npm run build