package octez-l2-libs

  1. Overview
  2. Docs
Octez layer2 libraries

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.1.tar.gz
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a

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.