# API Docs - v1.1.1

## Sinkmapper

### binary *<a target="_blank" href="https://siddhi.io/en/v4.x/docs/query-guide/#sink-mapper">(Sink Mapper)</a>*

<p style="word-wrap: break-word">This section explains how to map events processed via Siddhi in order to publish them in the <code>binary</code> format.</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 style="word-wrap: break-word">This will publish Siddhi event in binary format.</p>

## Sourcemapper

### binary *<a target="_blank" href="https://siddhi.io/en/v4.x/docs/query-guide/#source-mapper">(Source Mapper)</a>*

<p style="word-wrap: break-word">This extension is a binary input mapper that converts events received in <code>binary</code> format to Siddhi events before they are processed.</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 style="word-wrap: break-word">This query performs a mapping to convert an event of the <code>binary</code> format to a Siddhi event. </p>

