Blob

Binary blobs

hash

let hash : Blob -> Nat32

equal

func equal(x : Blob, y : Blob) : Bool

Returns x == y.

notEqual

func notEqual(x : Blob, y : Blob) : Bool

Returns x != y.

less

func less(x : Blob, y : Blob) : Bool

Returns x < y.

lessOrEqual

func lessOrEqual(x : Blob, y : Blob) : Bool

Returns x ⇐ y.

greater

func greater(x : Blob, y : Blob) : Bool

Returns x > y.

greaterOrEqual

func greaterOrEqual(x : Blob, y : Blob) : Bool

Returns x >= y.

compare

func compare(x : Blob, y : Blob) : {#less; #equal; #greater}

Returns the order of x and y.

fromArray

let fromArray : [Nat8] -> Blob

Creates a blob from an array of bytes, by copying each element.

fromArrayMut

let fromArrayMut : [var Nat8] -> Blob

Creates a blob from a mutable array of bytes, by copying each element.

toArray

let toArray : Blob -> [Nat8]

Creates an array of bytes from a blob, by copying each element.

toArrayMut

let toArrayMut : Blob -> [var Nat8]

Creates a mutable array of bytes from a blob, by copying each element.