mirror of
https://github.com/hanzoai/viem.git
synced 2026-10-30 19:36:39 +00:00
* refactor: rlp * chore: update tests * tests * vectors * chore: format * fix * chore: perf boost Co-authored-by: Sebastian Lorenz <[email protected]> * update * vitest * add deprecations * Create young-actors-fix.md * refactor * size-limit * snaps * bump size * bench: add @ethereumjs/rlp --------- Co-authored-by: jxom <[email protected]> Co-authored-by: Sebastian Lorenz <[email protected]>
14 lines
367 B
TypeScript
14 lines
367 B
TypeScript
export async function readGzippedJson(path: string) {
|
|
const vectorFile = Bun.file(path)
|
|
const vectorsChunk = Bun.gunzipSync(
|
|
new Uint8Array(await vectorFile.arrayBuffer()),
|
|
)
|
|
const stream = new ReadableStream({
|
|
start(controller) {
|
|
controller.enqueue(vectorsChunk)
|
|
controller.close()
|
|
},
|
|
})
|
|
return Bun.readableStreamToJSON(stream)
|
|
}
|