# gtv.toBytes · Rell standard library · Chromia Docs (concept)

> pure function toBytes(): byte_array Deprecated (for removal): Use 'to_bytes' instead Encode this GTV as byte array. Inverse of gtv.from_bytes(byte_array) .

Source: https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/gtv/to-bytes/

FUNCTION

# gtv.toBytes

```signature
pure function toBytes(): byte_array
```

**Deprecated** (for removal): Use 'to\_bytes' instead

Encode this GTV as byte array.

Inverse of `gtv.from_bytes(byte_array)`.

**Returns**

a byte array containing an encoding of this GTV

Since 0.9.0

**Alias of** [gtv.to\_bytes](https://docs.chromia.com/pages/rell-stdlib/-rell-system-library/root/gtv/to_bytes/)

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