@@ -191,20 +191,19 @@ impl<N: NInt, S: EncodingSign> RleV1Encoder<N, S> {
191
191
///
192
192
/// 1. `RleV1EncoderState::Empty`:
193
193
/// - Transitions to the `Literal` state with the given value as the first element in the buffer.
194
- /// 2. `RleV1EncoderState::Literal`:
195
- /// - The value is added to the buffer. If the buffer length reaches `MAX_LITERAL_LENGTH`, the buffer is written out
196
- /// and the state transitions to `Empty`.
197
- /// - If the buffer length is at least `MIN_RUN_LENGTH` and the values in the buffer form a valid run (i.e., the deltas
198
- /// between consecutive values are consistent and within the allowed range), the state transitions to `Run`.
199
- /// - Otherwise, the state remains `Literal`.
200
- /// 3. `RleV1EncoderState::Run`:
194
+ /// 2. `RleV1EncoderState::Run`:
201
195
/// - If the value continues the current run (i.e., it matches the expected value based on the run's delta and length),
202
196
/// the run length is incremented. If the run length reaches `MAX_RUN_LENGTH`, the run is written out and the state
203
197
/// transitions to `Empty`.
204
198
/// - If the value does not continue the current run, the existing run is written out and the state transitions to
205
199
/// `Literal` with the new value as the first element in the buffer.
200
+ /// 3. `RleV1EncoderState::Literal`:
201
+ /// - The value is added to the buffer. If the buffer length reaches `MAX_LITERAL_LENGTH`, the buffer is written out
202
+ /// and the state transitions to `Empty`.
203
+ /// - If the buffer length is at least `MIN_RUN_LENGTH` and the values in the buffer form a valid run (i.e., the deltas
204
+ /// between consecutive values are consistent and within the allowed range), the state transitions to `Run`.
205
+ /// - Otherwise, the state remains `Literal`.
206
206
///
207
-
208
207
fn process_value ( & mut self , value : N ) {
209
208
match & mut self . state {
210
209
RleV1EncodingState :: Empty => {
0 commit comments