package octez-l2-libs

  1. Overview
  2. Docs
Octez layer2 libraries

Install

Dune Dependency

Authors

Maintainers

Sources

octez-19.0.tar.gz
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13

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.