Module protobuffs

A protcol buffers encoding and decoding module.

Description

A protcol buffers encoding and decoding module.

Data Types

encoded_field_type()

encoded_field_type() = 0 | 1 | 2 | 3 | 4 | 5

field_type()

field_type() = bool | enum | int32 | uint32 | int64 | uint64 | sint32 | sint64 | fixed32 | sfixed32 | fixed64 | sfixed64 | string | bytes | float | double

Function Index

decode/2Decode a single value from a protobuffs data structure.
decode_packed/2Decode packed values from a protobuffs data structure.
decode_value/3Will be hidden in future releases.
encode/3Encode an Erlang data structure into a Protocol Buffers value.
encode_packed/3Encode an list of Erlang data structure into a Protocol Buffers values.
main/1Runs command line utility.
next_field_num/1Returns the next field number id from a protobuffs data structure.
read_field_num_and_wire_type/1Will be hidden in future releases.
skip_next_field/1Skips the field at the front of the message, effectively ignoring it.

Function Details

decode/2

decode(Bytes::binary(), ExpectedType::field_type()) -> {{non_neg_integer(), any()}, binary()}

Decode a single value from a protobuffs data structure

decode_packed/2

decode_packed(Bytes::binary(), ExpectedType::field_type()) -> {{non_neg_integer(), any()}, binary()}

Decode packed values from a protobuffs data structure

decode_value/3

decode_value(Bytes::binary(), WireType::encoded_field_type(), ExpectedType::field_type()) -> {any(), binary()}

Will be hidden in future releases

encode/3

encode(FieldID::non_neg_integer(), Value::any(), Type::field_type()) -> iodata()

Encode an Erlang data structure into a Protocol Buffers value.

encode_packed/3

encode_packed(FieldID::non_neg_integer(), Values::list(), Type::field_type()) -> binary()

Encode an list of Erlang data structure into a Protocol Buffers values.

main/1

main(Args) -> any()

Runs command line utility

next_field_num/1

next_field_num(Bytes::binary()) -> {ok, non_neg_integer()}

Returns the next field number id from a protobuffs data structure

read_field_num_and_wire_type/1

read_field_num_and_wire_type(Bytes::binary()) -> {{non_neg_integer(), encoded_field_type()}, binary()}

Will be hidden in future releases

skip_next_field/1

skip_next_field(Bytes::binary()) -> {ok, binary()}

Skips the field at the front of the message, effectively ignoring it.


Generated by EDoc