pawitp / protobuf-decoder

JavaScript-based web UI to decode ad-hoc Protobuf data
https://protobuf-decoder.netlify.app/
MIT License
392 stars 91 forks source link

upload from file & collaboration #85

Closed konsumer closed 5 months ago

konsumer commented 5 months ago

Hi, I made these libs (which might be helpful, here):

I like that your tool uses other methods, so I can verify if I am doing sensible stuff in mine. We should maybe collab!

It would be helpful to be able to upload a bin-dump file (not actual upload, just use web file-api to fill the textarea.) Is this something I should PR for?

As it is, I can do this in node:

const { readFile } = require('fs/promises')
b = await readFile('test/google-play-details.bin')
console.log(b.toString('hex'))

and it works great, but it would be handy to be able to just browse for a test file I have (I have a bunch of different protobuf torture-test dumps.)

konsumer commented 5 months ago

I just made a PR that does upload. Wasn't quite sure what UI should look like, so I just tacked it onto the textarea.

Screenshot 2024-04-25 at 9 29 16 PM