improve phrasing of CompressionScheme docs
This commit is contained in:
parent
a1f5e6843a
commit
fd0662b66d
1 changed files with 2 additions and 2 deletions
|
|
@ -10,14 +10,14 @@ pub trait CompressionScheme {
|
|||
/// Encode some bytes into `buf`, returning a [`Header`][Self::Header].
|
||||
///
|
||||
/// This does not necessarily have to be deterministic,
|
||||
/// but it **must** always be decodable by [`decode`](Self::decode).
|
||||
/// but it **must** be decodable by [`decode`](Self::decode).
|
||||
/// That is, [`decode`](Self::decode) ∘ [`encode`](Self::encode) = `id`.
|
||||
fn encode(src: &[u8], buf: &mut BitVec) -> Self::Header;
|
||||
|
||||
/// Decode the given bits and header into `buf`.
|
||||
///
|
||||
/// This may panic on arbitrary input,
|
||||
/// but it **must** always decode outputs of [`encode`](Self::encode).
|
||||
/// but it **must** successfully decode outputs of [`encode`](Self::encode).
|
||||
/// That is, [`decode`](Self::decode) ∘ [`encode`](Self::encode) = `id`.
|
||||
fn decode(src: &BitSlice, header: &Self::Header, buf: &mut Vec<u8>);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue