Package

purescript-cbor-stream

Repository
cakekindel/purescript-cbor-stream
License
GPL-3.0-or-later
Uploaded by
pacchettibotti
Published on
2024-06-24T00:46:13Z

Type-safe bindings for the streaming API of cbor-x

Installing

spago install cbor-stream
{bun|yarn|npm|pnpm} install cbor-x

Examples

Convert a cbor-encoded dataset to csv

import Pipes.Node.Stream as Pipes.Stream
import Pipes.Node.FS as Pipes.FS
import Pipes.Node.Buffer as Pipes.Buffer
import Pipes.CBOR as Pipes.CBOR
import Pipes.CSV as Pipes.CSV
import Pipes.Prelude ((>->))
import Pipes.Prelude as Pipes

Pipes.runEffect
  $ Pipes.FS.read "foo.bin"
    >-> Pipes.CBOR.decode @{id :: Int, name :: String}
    >-> Pipes.CSV.stringify
    >-> Pipes.FS.write "foo.csv"
Modules
Data.CBOR
Effect.CBOR
Node.Stream.CBOR.Decode
Node.Stream.CBOR.Encode
Node.Stream.CBOR.Options
Pipes.CBOR
Dependencies