{"size": 1124, "ext": "scrbl", "max_stars_repo_path": "scribblings/main.scrbl", "max_stars_repo_name": "Hallicopter/racket-protobuf", "max_stars_repo_stars_event_min_datetime": "2021-03-15T02:48:50.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-15T02:48:50.000Z", "max_issues_repo_path": "scribblings/main.scrbl", "max_issues_repo_name": "Hallicopter/racket-protobuf", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "scribblings/main.scrbl", "max_forks_repo_name": "Hallicopter/racket-protobuf", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.3783783784, "max_line_length": 107, "alphanum_fraction": 0.7446619217}
#lang scribble/manual
@require[(for-label "../main.rkt")]

@title{Protocol Buffers: Portable Data Serialization}

@table-of-contents[]

@defmodule[(lib "protobuf/main")]{

  Facilities to read and write @link["https://developers.google.com/protocol-buffers/"]{Protocol Buffers}
  in binary format. The basic message type is re-exported from the
  reflection module.
  
}

@defproc[(deserialize [type/msg (or/c struct-type? struct?)] [in input-port? (current-input-port)]) any/c]{

  Read a structure instance encoded in protocol buffer format from the
  port @racket[in]. @racket[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.

}

@defproc[(serialize [v struct?] [out output-port? (current-output-port)]) void?]{

  Write @racket[v] to the port @racket[out], encoding it in protocol
  buffer format. @racket[v] must be an instance of a protocol buffer
  message type.

}

@include-section{reflection.scrbl}
@include-section{syntax.scrbl}
@include-section{encoding.scrbl}
@include-section{license.scrbl}
