Skip to content

Commit e6c1058

Browse files
committed
fix
1 parent a1e954a commit e6c1058

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/encoding/integer/rle_v1.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -191,20 +191,19 @@ impl<N: NInt, S: EncodingSign> RleV1Encoder<N, S> {
191191
///
192192
/// 1. `RleV1EncoderState::Empty`:
193193
/// - 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`:
201195
/// - If the value continues the current run (i.e., it matches the expected value based on the run's delta and length),
202196
/// the run length is incremented. If the run length reaches `MAX_RUN_LENGTH`, the run is written out and the state
203197
/// transitions to `Empty`.
204198
/// - If the value does not continue the current run, the existing run is written out and the state transitions to
205199
/// `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`.
206206
///
207-
208207
fn process_value(&mut self, value: N) {
209208
match &mut self.state {
210209
RleV1EncodingState::Empty => {

0 commit comments

Comments
 (0)