Module
Protobuf.Encode32
- Package
- purescript-protobuf
- Repository
- xc-jp/purescript-protobuf
Primitive UInt-based builders for encoding Google Protocol Buffers.
There is no varint32
in the Protbuf spec, this is
just a performance-improving assumption we make
in cases where only a deranged lunatic would use a value
bigger than 32 bits, such as in field numbers.
We think this is worth the risk because UInt
is
represented as a native Javascript Number whereas
Long
is a composite library type, so we expect the
performance difference to be significant.
#tag32 Source
tag32 :: forall m. MonadEffect m => FieldNumber -> WireType -> PutM m Unit
https://developers.google.com/protocol-buffers/docs/encoding#structure
#varint32 Source
varint32 :: forall m. MonadEffect m => UInt -> PutM m Unit
https://developers.google.com/protocol-buffers/docs/encoding#varints