package packstream

  1. Overview
  2. Docs
Packstream parses and serializes Packstream binary format

Install

Dune Dependency

Authors

Maintainers

Sources

0.1.tar.gz
md5=b42862e522117cce228191a514d68ae5
sha512=7e23451b43624db223068e53504d173beebd304466d80780b8b9df0ce3ba8671cfdebc68ea603481bf2a80ee1f5308d100f72bac041345e6b5d5f03e2cb1d9cf

Description

Packstream parses and serializes Packstream binary format.

Published: 21 Feb 2022

README

OCaml Packstream Library

This library can be used to parse and generate Packstream-formatted data.:w

How to install

ocaml install packstream

How to use

(executable
 (name        foo)
  (libraries   (packstream)))

Usage

utop [0]: open Packstream;;
utop [1]: parse @@ Bitstring.bitstring_of_string "\xB5\x52\x0B\x02\x03\x85KNOWS\xA1\x84name\x87example";;
- : (Message.t, string) result =
Core.Ok
 (Packstream.Message.Relationship
   {Packstream.Relationship.id = 11; start_node_id = 2; end_node_id = 3;
    typ = "KNOWS";
    properties = [("name", Packstream.Message.String "example")]})

 utop [2]: serialize @@ Struct { length = 3; tag = 0x12; fields = [Int 1L; String "Howdy"; List [Float 1.23; True]] };;
- : Bitstring.t =
("\179\018\001\133Howdy\146\193?\243\174\020z\225G\174\195", 0, 160)

Dependencies (6)

  1. ppx_deriving >= "5.2.1"
  2. ppx_bitstring >= "4.1.0"
  3. bitstring >= "4.1.0"
  4. core >= "0.14.0"
  5. ocaml >= "4.08.0"
  6. dune >= "2.8"

Dev Dependencies (2)

  1. odoc with-doc
  2. ounit2 with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.