Ludwig.Bytes

Module Members

fromList

(Function)

Construct a Ludwig.Bytes value from a list of bytes represented as Ludwig.Ints.

The Ludwig.Ints must be in the [0, 255] range. This is currently not checked and values outside of that range are truncated.

Type Signature

 fun (List<Int>) -> Bytes
Argument: list

List of bytes to pack into a Ludwig.Bytes value

Type: List<Int>

Returns:

The Ludwig.Bytes value

Type: Bytes

readFile

(Function)

Read a Ludwig.Bytes from a file.

Example:

bytes: readFile("sqlite.db")

Type Signature

 fun (String) -> Bytes
Argument: filePath

The path of the file to read. Relative paths are considered relative to the directory where the compiler is invoked, not the location of the composition.

Type: String

Returns:

The contents of the file.

Type: Bytes