# API Docs - v2.1.1

!!! Info "Tested Siddhi Core version: *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/">5.1.21</a>*"
    It could also support other Siddhi Core minor versions.

## Sinkmapper

### binary *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#sink-mapper">(Sink Mapper)</a>*
<p></p>
<p style="word-wrap: break-word;margin: 0;">This section explains how to map events processed via Siddhi in order to publish them in the <code>binary</code> format.</p>
<p></p>
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>

```
@sink(..., @map(type="binary")
```

<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
<span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span>
```
@sink(type='inMemory', topic='WSO2', @map(type='binary')) define stream FooStream (symbol string, price float, volume long); 
```
<p></p>
<p style="word-wrap: break-word;margin: 0;">This will publish Siddhi event in binary format.</p>
<p></p>
## Sourcemapper

### binary *<a target="_blank" href="http://siddhi.io/en/v5.1/docs/query-guide/#source-mapper">(Source Mapper)</a>*
<p></p>
<p style="word-wrap: break-word;margin: 0;">This extension is a binary input mapper that converts events received in <code>binary</code> format to Siddhi events before they are processed.</p>
<p></p>
<span id="syntax" class="md-typeset" style="display: block; font-weight: bold;">Syntax</span>

```
@source(..., @map(type="binary")
```

<span id="examples" class="md-typeset" style="display: block; font-weight: bold;">Examples</span>
<span id="example-1" class="md-typeset" style="display: block; color: rgba(0, 0, 0, 0.54); font-size: 12.8px; font-weight: bold;">EXAMPLE 1</span>
```
@source(type='inMemory', topic='WSO2', @map(type='binary'))define stream FooStream (symbol string, price float, volume long); 
```
<p></p>
<p style="word-wrap: break-word;margin: 0;">This query performs a mapping to convert an event of the <code>binary</code> format to a Siddhi event. </p>
<p></p>
