Module
Protobuf.Decode32
- Package
- purescript-protobuf
- Repository
- xc-jp/purescript-protobuf
Primitive UInt
-based parsers for decoding 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 => ParserT DataView m (Tuple FieldNumber WireType)
Parse the field number and wire type of the next field. https://developers.google.com/protocol-buffers/docs/encoding#structure