Presto 101t Documentation

9.7. Binary Functions

9.7. Binary Functions

Binary Functions

length(binary) → bigint

Returns the length of binary in bytes.

to_base64(binary) → varchar

Encodes binary into a base64 string representation.

from_base64(string) → varbinary

Decodes binary data from the base64 encoded string.

to_base64url(binary) → varchar

Encodes binary into a base64 string representation using the URL safe alphabet.

from_base64url(string) → varbinary

Decodes binary data from the base64 encoded string using the URL safe alphabet.

to_hex(binary) → varchar

Encodes binary into a hex string representation.

from_hex(string) → varbinary

Decodes binary data from the hex encoded string.