package octez-l2-libs

  1. Overview
  2. Docs
val decode_step : ('a -> int Lwt.t) -> 'a -> (int * int list) Lwt.t

decode_step get stream reads a character (or more) from a stream stream using get and returns its Utf8 representation and the bytes read from the stream. Reads at most 4 bytes.

  • raises Binary_exn.Utf8

    in case the encoding is illformed with regards to the Utf8 conventions.

val encode_int : int -> int list

encode_int i encodes an Utf8 represented into an integer into its char codes.

  • raises Binary_exn.Utf8

    in case the encoding is illformed with regards to the Utf8 conventions.

encode vec decodes a string into its UTF8 vector representation.

  • raises Binary_exn.Utf8

    in case the encoding is illformed with regards to the Utf8 conventions.

encode vec encodes an UTF8 vector into its string representation.

  • raises Binary_exn.Utf8

    in case the encoding is illformed with regards to the Utf8 conventions.

val encode_unsafe : int Tezos_lazy_containers.Lazy_vector.Int32Vector.t -> string

encode_unsafe vec encodes an UTF8 vector into its string representation without forcing the values in the lazy_vector. This function is witness of the internal mutation, and as such should only be used in the binary part of the interpreter, never in the PVM.

  • raises Binary_exn.Utf8

    in case the encoding is illformed with regards to the Utf8 conventions.

val encode_list : int list -> string

encode_list vec encodes an UTF8 bytes list into its string representation.

  • raises Binary_exn.Utf8

    in case the encoding is illformed with regards to the Utf8 conventions.

OCaml

Innovation. Community. Security.