Protobuf.Internal.Decode
- Package
- purescript-protobuf
- Repository
- xc-jp/purescript-protobuf
Primitive parsers for decoding Google Protocol Buffers.
#decodeDouble Source
decodeDouble :: forall m. MonadEffect m => ParserT DataView m Numberdouble Scalar Value Type
#decodeDoubleArray Source
decodeDoubleArray :: forall m. MonadEffect m => ByteLength -> ParserT DataView m (Array Number)repeated packed double
#decodeFloat Source
decodeFloat :: forall m. MonadEffect m => ParserT DataView m Float32float Scalar Value Type
#decodeFloatArray Source
decodeFloatArray :: forall m. MonadEffect m => ByteLength -> ParserT DataView m (Array Float32)repeated packed float
#decodeInt32 Source
decodeInt32 :: forall m. MonadEffect m => ParserT DataView m Intint32 Scalar Value Type
#decodeInt64 Source
decodeInt64 :: forall m. MonadEffect m => ParserT DataView m (Long Signed)int64 Scalar Value Type
#decodeUint32 Source
decodeUint32 :: forall m. MonadEffect m => ParserT DataView m UIntuint32 Scalar Value Type
#decodeUint64 Source
decodeUint64 :: forall m. MonadEffect m => ParserT DataView m (Long Unsigned)uint64 Scalar Value Type
#decodeSint32 Source
decodeSint32 :: forall m. MonadEffect m => ParserT DataView m Intsint32 Scalar Value Type
#decodeSint64 Source
decodeSint64 :: forall m. MonadEffect m => ParserT DataView m (Long Signed)sint64 Scalar Value Type
#decodeFixed32 Source
decodeFixed32 :: forall m. MonadEffect m => ParserT DataView m UIntfixed32 Scalar Value Type
#decodeFixed32Array Source
decodeFixed32Array :: forall m. MonadEffect m => ByteLength -> ParserT DataView m (Array UInt)repeated packed fixed32
#decodeFixed64 Source
decodeFixed64 :: forall m. MonadEffect m => ParserT DataView m (Long Unsigned)fixed64 Scalar Value Type
#decodeFixed64Array Source
decodeFixed64Array :: forall m. MonadEffect m => ByteLength -> ParserT DataView m (Array (Long Unsigned))repeated packed fixed64
#decodeSfixed32 Source
decodeSfixed32 :: forall m. MonadEffect m => ParserT DataView m Intsfixed32 Scalar Value Type
#decodeSfixed32Array Source
decodeSfixed32Array :: forall m. MonadEffect m => ByteLength -> ParserT DataView m (Array Int)repeated packed sfixed32
#decodeSfixed64 Source
decodeSfixed64 :: forall m. MonadEffect m => ParserT DataView m (Long Signed)sfixed64 Scalar Value Type
#decodeSfixed64Array Source
decodeSfixed64Array :: forall m. MonadEffect m => ByteLength -> ParserT DataView m (Array (Long Signed))repeated packed sfixed64
#decodeBool Source
decodeBool :: forall m. MonadEffect m => ParserT DataView m Booleanbool Scalar Value Type
#decodeString Source
decodeString :: forall m. MonadEffect m => ParserT DataView m Stringstring Scalar Value Type
#decodeBytes Source
decodeBytes :: forall m. MonadEffect m => ParserT DataView m Bytesbytes Scalar Value Type
#decodeVarint32 Source
decodeVarint32 :: forall m. MonadEffect m => ParserT DataView m UIntThere is no varint32 in the Protbuf spec, this is
just a performance-improving assumption we make
in cases where we would be surprised to see a number
larger 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.
https://developers.google.com/protocol-buffers/docs/encoding#varints
#decodeTag32 Source
decodeTag32 :: 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