2017-11-14 03:32:46 +04:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
2017-11-14 03:36:14 +04:00
|
|
|
(* Copyright (c) 2014 - 2017. *)
|
2017-11-14 03:32:46 +04:00
|
|
|
(* Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. No warranty, explicit or implicit, provided. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
2017-02-19 21:22:32 +04:00
|
|
|
|
|
|
|
type 'a encoding
|
|
|
|
|
|
|
|
val simple_decode: 'a encoding -> string -> 'a option
|
|
|
|
val simple_encode: 'a encoding -> 'a -> string
|
|
|
|
|
|
|
|
type data = ..
|
|
|
|
|
|
|
|
val register_encoding:
|
|
|
|
prefix: string ->
|
|
|
|
length: int ->
|
|
|
|
to_raw: ('a -> string) ->
|
|
|
|
of_raw: (string -> 'a option) ->
|
|
|
|
wrap: ('a -> data) ->
|
|
|
|
'a encoding
|
|
|
|
|
|
|
|
val check_encoded_prefix: 'a encoding -> string -> int -> unit
|
|
|
|
|
|
|
|
val decode: string -> data option
|