Navigation

binary

On this page

Definition

binary

Decodes base64 or hexadecimal encoded data and outputs as binary data stream.

You can only use the binary action in the first stage of a pipeline.

The binary action stage has the following syntax:

{"service": "", "action": "binary", args: {"encoding": <"hex"|"base64">, data: <encoded string>} }

The binary action has the following arguments:

Argument Type Description
encoding string

Encoding format of data argument. Specify either:

  • "hex"
  • "base64"
data string Encoded data string to decode and pass on as binary data.

Example

Consider the following pipeline of two stages:

[
  {"service": "", "action": "binary", "args": {"encoding": "base64", "data": "VGhlIGNvdyBpcyBicm93bi4="}},
  {"service": "", "action": "reader", "args": {}}
]

Stage1: The binary stage outputs a decoded output stream of binary data.

Stage2: The reader stage reads the input stream and outputs the following string:

"The cow is brown."
←   Built-In Actions encode  →