Files
607069d24a perf/refactor: rlp (#1215)
* 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]>
2023-09-24 20:56:33 +00:00

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)
}