Available languages: [Python](https://databento.com/docs/api-historical/helpers/dbn-store-with-zstd-buffer.python.md) · [C++](https://databento.com/docs/api-historical/helpers/dbn-store-with-zstd-buffer.cpp.md) · [Rust](https://databento.com/docs/api-historical/helpers/dbn-store-with-zstd-buffer.rust.md) · [HTTP](https://databento.com/docs/api-historical/helpers/dbn-store-with-zstd-buffer.http.md)

Source: https://databento.com/docs/api-historical/helpers/dbn-store-with-zstd-buffer


### AsyncDbnStore::with_zstd_buffer

Create a new decoder from a buffered Zstandard-compressed DBN stream that implements [AsyncBufReadExt](https://docs.rs/tokio/latest/tokio/io/trait.AsyncBufReadExt.html).

#### API method

```rust
pub async fn with_zstd_buffer<R>(
    mut reader: R,
) -> dbn::Result<Self>
where
    R: tokio::io::AsyncBufReadExt + Unpin;
```

#### Parameters

| Parameter | Type | Description |
| `reader` | R: tokio::io::AsyncBufReadExt + Unpin | A readable buffered Zstandard-compressed DBN byte stream. |

#### Returns

An [AsyncDbnStore](https://databento.com/docs/api-historical/helpers/dbn-store.md) object.

This function will return an error if it is unable to parse the metadata in `reader` or the input is encoded in a newer version of DBN.
