This commit is contained in:
Edgar 2022-01-06 10:48:30 +01:00
parent bbce92cd6e
commit c5a9a8ad45
No known key found for this signature in database
GPG key ID: 8731E6C0166EAA85

View file

@ -56,7 +56,7 @@ let buffer = Cursor::new(bytes_compressed);
```
Good, now we can pass this buffer to the zstd [Decoder](https://docs.rs/zstd/0.9.0+zstd.1.5.0/zstd/stream/read/struct.Decoder.html), which takes anything that implements [Read](https://doc.rust-lang.org/std/io/trait.Read.html),
it also wraps it around a [BufRead](https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html) for buffered reading.
it also wraps it around a [BufReader](https://doc.rust-lang.org/nightly/std/io/struct.BufReader.html) for buffered reading.
```rust
// The type of decoder is Decoder<BufReader<Cursor<Vec<u8>>>>