Module Constant.Raw

Convert to from constants from raw bit patterns stored in strings and bytes. Data is copied and resized as appropriate.

val of_bytes : Base.Bytes.t -> width:Base.int -> t

Convert from a byte buffer. The copied data is padded as required.

val of_string : Base.String.t -> width:Base.int -> t

Convert from a string buffer. The copied data is padded as required.

val to_string : t -> Base.String.t

Convert to a string buffer. The output buffer length is rounded to a multiple of 8 bits .

val to_bytes : t -> Base.Bytes.t