Module

Protobuf.Encode32

Package
purescript-protobuf
Repository
xc-jp/purescript-protobuf

Primitive UInt-based builders for encoding Google Protocol Buffers.

Do not import this module. See package README for explanation.

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.