package plebeia

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

3 Serialization

3 Serialization

val encode : Segment.t -> string

len/8+1 bytes.

<--- len / 8 + 1 bytes -----------> <--- len bits ------------> +---------------------------+-------+ | segment bits (len bits) |10

,7

| +---------------------------+-------+

At most 7 zeros at tail.

Examples:

data | binary ----------------------------- empty segment | 80 LRLRLRLRL | 5540 LRLRLRLR | 5580 RRRRRRRRRRRRRRRRRRRR | fffff8

val decode : string -> Segment.t option
val decode_exn : string -> Segment.t
val encode_list : Segment.t list -> string
val decode_list : string -> Segment.t list option
val decode_list_slice : (string * int) -> (Segment.t list * int) option

slice version