File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
arithmetic-coding-core/src/model Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ pub trait Model {
135
135
fn max_length ( & self ) -> usize ;
136
136
}
137
137
138
- /// A wrapper which converts a [`fixed_length ::Model`](Model) to a
138
+ /// A wrapper which converts a [`max_length ::Model`](Model) to a
139
139
/// [`crate::Model`].
140
140
#[ derive( Debug , Clone ) ]
141
141
pub struct Wrapper < M >
@@ -150,7 +150,7 @@ impl<M> Wrapper<M>
150
150
where
151
151
M : Model ,
152
152
{
153
- /// Construct a new wrapper from a [`fixed_length:: Model`](Model)
153
+ /// Construct a new wrapper from a [`Model`]
154
154
pub fn new ( model : M ) -> Self {
155
155
let remaining = model. max_length ( ) ;
156
156
Self { model, remaining }
Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ use crate::{fixed_length, BitStore};
7
7
8
8
/// A [`Model`] is used to calculate the probability of a given symbol occuring
9
9
/// in a sequence. The [`Model`] is used both for encoding and decoding. A
10
- /// 'fixed-length' model always expects an exact number of symbols , and so does
10
+ /// 'one-shot' only ever encodes a single symbol , and so does
11
11
/// not need to encode an EOF symbol.
12
12
///
13
- /// A fixed length model can be converted into a regular model using the
13
+ /// A one-shot [`Model`] is a special case of the [`fixed_length::Model`].
14
+ ///
15
+ /// A one-shot model can be converted into a regular model using the
14
16
/// convenience [`Wrapper`] type.
15
17
///
16
18
/// The more accurately a [`Model`] is able to predict the next symbol, the
You can’t perform that action at this time.
0 commit comments