package plebeia

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Segment encoding of file names

type t = (module Fs_types.NAMEENC)
val bits8 : t

Path encoding. 8bits/1char, the simplest encoding but inefficient

val bits6 : t

Path encoding. 6bits/1char. Only chars match with 0-9a-z_- are allowed.

val compressed : string -> t

Compact path encoding specialized for Tezos context.

Hex 0-9a-f+, 2n chars, 2n >= 16 : 4bits/char + 1 bit L flag, no terminator. Assuming all the file names at the same directory have the same length.

Other Hex 0-9a-f+ : 5bits/char + 2 bit RL flag, 1 bit terminator

Others: : 32bit hash + 2 bit RR flag

It takes the path name for the name record

val compressed' : t

Other variants of compressed conversions for tests

val compressed'' : t
val to_segment : t -> Fs_types.Name.t -> Segment.t
val of_segment : t -> Segment.t -> Fs_types.Name.t option
val to_segments : t -> Fs_types.Path.t -> Segment.t list
val of_segments : t -> Segment.t list -> Fs_types.Path.t option
OCaml

Innovation. Community. Security.