3 library(protobufs): Google's Protocol Buffers
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • Google's Protocol Buffers Library
        • library(protobufs): Google's Protocol Buffers
          • protobuf_message/2
          • protobuf_message/3
Availability::- use_module(library(protobufs)).(can be autoloaded)
Source[semidet]protobuf_message(?Template, ?Wire_stream)
[nondet]protobuf_message(?Template, ?Wire_stream, ?Rest)
Marshalls and unmarshalls byte streams encoded using Google's Protobuf grammars. protobuf_message/2 provides a bi-directional parser that marshalls a Prolog structure to Wire_stream, according to rules specified by Template. It can also unmarshall Wire_stream into a Prolog structure according to the same grammar. protobuf_message/3 provides a difference list version.
Template is a protobuf grammar specification. On decode, unbound variables in the Template are unified with their respective values in the Wire_stream. On encode, Template must be ground.
Wire_stream is a code list that was generated by a protobuf encoder using an equivalent template.