On this page:
Protocol Buffers:   Portable Data Serialization

Protocol Buffers: Portable Data Serialization

    1 Reflection

    2 Syntax

    3 Encoding

    4 License

 (require (lib "protobuf/main")) package: protobuf
Facilities to read and write Protocol Buffers in binary format. The basic message type is re-exported from the reflection module.


(deserialize type/msg [in])  any/c

  type/msg : (or/c struct-type? struct?)
  in : input-port? = (current-input-port)
Read a structure instance encoded in protocol buffer format from the port in. type/msg can either represent a protocol buffer message type or be an existing protocol buffer message that will be destructively merged with the newly read data.


(serialize v [out])  void?

  v : struct?
  out : output-port? = (current-output-port)
Write v to the port out, encoding it in protocol buffer format. v must be an instance of a protocol buffer message type.