# byte_array · Rell standard library · Chromia Docs (concept)

> type byte_array: iterable < integer > An array of bytes. This type is immutable. Since 0.6.0 Methods byte_array decode empty Returns true if this bytearray

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/

TYPE

# byte\_array

```signature
type byte_array: iterable<integer>
```

An array of bytes. This type is immutable.

Since 0.6.0

## Methods

[byte\_array](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/byte_array/)

[decode](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/decode/)

[empty](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/empty/)
:   Returns true if this bytearray is empty, false otherwise.

[from\_base64](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/from_base64/)
:   Create a byte array from a base-64 string.

[from\_hex](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/from_hex/)
:   Create a byte array from a hexadecimal string.

[from\_list](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/from_list/)
:   Create a bytearray from a list of integers.

[join\_to\_text](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/join_to_text/)
:   Generate a textual representation of this iterable.

[len](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/len/)
:   Returns the number of bytes in this bytearray.

[repeat](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/repeat/)
:   Repeats this bytearray n times.

[reversed](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/reversed/)
:   Returns a reversed copy of this bytearray.

[sha256](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/sha256/)
:   Calculates the SHA-256 digest (hash) of this byte array.

[size](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/size/)
:   Returns the number of bytes in this bytearray.

[sub](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/sub/)
:   Returns a sub-array of this byte array starting from the specified index (inclusive).

[toList](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/to-list/)
:   Converts this bytearray to a list of integers.

[to\_base64](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/to_base64/)
:   Returns a base-64 text representation of this bytearray.

[to\_hex](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/to_hex/)
:   Returns a hexadecimal text representation of this bytearray.

[to\_list](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/byte_array/to_list/)
:   Converts this bytearray to a list of integers.

[View this page on docs.chromia.com](https://docs.chromia.com/pages/rell-stdlib/-rell%20-system%20-library/%5Broot%5D/byte_array/index.html)Generated API reference, mirrored from the live docs
