package octez-l2-libs

  1. Overview
  2. Docs
Octez layer2 libraries

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.1.tar.gz
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053

doc/octez-l2-libs.webassembly-interpreter/Tezos_webassembly_interpreter/Utf8/index.html

Module Tezos_webassembly_interpreter.Utf8

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.

val encode : int Tezos_lazy_containers.Lazy_vector.Int32Vector.t -> string Lwt.t

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.