AsyncDbnStore::with_zstd
Create a new decoder from a Zstandard-compressed DBN stream that implements AsyncReadExt.
If reader implements AsyncBufRead, it's better to use with_zstd_buffer to avoid unnecessary additional buffering.
Parameters
| Parameter | Type | Description |
|---|---|---|
reader | R: tokio::io::AsyncReadExt + Unpin | A readable Zstandard-compressed DBN byte stream. |
Returns
An AsyncDbnStore 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.
API method
pub async fn with_zstd<R>(mut reader: R) -> dbn::Result<Self>
where
R: tokio::io::AsyncReadExt + Unpin;