readme: deserializer/decoder actually accepts `&[u8]`, not `Vec<u8>`

This commit is contained in:
Tshepang Lekhonkhobe 2017-07-22 23:40:45 +02:00
parent 18b9225ab1
commit 07b2514737
1 changed files with 3 additions and 2 deletions

View File

@ -10,8 +10,9 @@ A compact encoder / decoder pair that uses a binary zero-fluff encoding scheme.
The size of the encoded object will be the same or smaller than the size that The size of the encoded object will be the same or smaller than the size that
the object takes up in memory in a running Rust program. the object takes up in memory in a running Rust program.
In addition to exposing two simple functions that encode to Vec<u8> and decode In addition to exposing two simple functions
from Vec<u8>, binary-encode exposes a Reader/Writer API that makes it work (one that encodes to `Vec<u8>`, and one that decodes from `&[u8]`),
binary-encode exposes a Reader/Writer API that makes it work
perfectly with other stream-based apis such as rust files, network streams, perfectly with other stream-based apis such as rust files, network streams,
and the [flate2-rs](https://github.com/alexcrichton/flate2-rs) compression and the [flate2-rs](https://github.com/alexcrichton/flate2-rs) compression
library. library.