## Sink


A buffered output sink.


Usage

``` python
Sink(
    dest,
    buffer_size=4096,
)
```


## Parameters


`dest: str`  
Destination file path or file-like object.

`buffer_size: int = ``4096`  
Write buffer size in bytes.


## Methods

| Name | Description |
|----|----|
| [flush()](#flush) | Flush the write buffer. |
| [write()](#write) | Write data to the sink. |

------------------------------------------------------------------------


#### flush()


Flush the write buffer.


Usage

``` python
flush()
```


------------------------------------------------------------------------


#### write()


Write data to the sink.


Usage

``` python
write(data)
```


##### Parameters


`data: bytes`  
Bytes to write.


##### Returns


`int`  
Number of bytes written.
