package cobs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val default_delim : char
val to_cobs : ?delim:char -> bytes -> bytes

to_cobs ?delim bytes is a bytes containing a COBS-encoded representation of the given bytes, using the provided delimiter (defaults to '\000').

The encoded representation will not end with a delimiter byte; if it is necessary, you must append it to the output of to_cobs.

val from_cobs : ?delim:char -> bytes -> bytes

from_cobs bytes is a bytes containing the result of COBS-decoding the given bytes, using the provided delimiter (defaults to '\000').

bytes is expected to not end with the delimiter byte; if present, it should be stripped before passing the data to from_cobs.

OCaml

Innovation. Community. Security.