update to v2
This commit is contained in:
parent
53ca898b13
commit
4842cc268a
6 changed files with 310 additions and 272 deletions
18
inspect-dump.ts
Normal file
18
inspect-dump.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { $ } from "bun";
|
||||
import * as fs from "fs/promises";
|
||||
|
||||
const dumps = ["EAMqERIGc29waGllGgcjZDlhMmMy", "16, 3, 42, 9, 10, 5, 76, 111, 98, 98, 121, 16, 4, 42, 8, 10, 4, 116, 101, 115, 116, 16, 1, 42, 20, 10, 16, 83, 111, 109, 101, 111, 110, 101, 32, 112, 114, 97, 99, 116, 105, 115, 101, 16, 1 "].map(
|
||||
(z) => {
|
||||
if(z.includes(",")) {
|
||||
return new Uint8Array(z.split(",").map(z=>+z))
|
||||
} else {
|
||||
return Buffer.from(z, "base64");
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
for await (const dump of dumps) {
|
||||
await fs.writeFile("dump", new Uint8Array(dump.buffer));
|
||||
const info = await $`~/.local/bin/protobuf_inspector < dump`;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue