fixed comments
This commit is contained in:
parent
a14dae5863
commit
4e8fd53e70
|
@ -35,7 +35,7 @@ impl<'b> Decoder<'b> {
|
||||||
Ok(zigzag::to_isize(self.word()?))
|
Ok(zigzag::to_isize(self.word()?))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Decode an integer of any size.
|
/// Decode an integer of 128 bits size.
|
||||||
/// This is byte alignment agnostic.
|
/// This is byte alignment agnostic.
|
||||||
/// First we decode the next 8 bits of the buffer.
|
/// First we decode the next 8 bits of the buffer.
|
||||||
/// We take the 7 least significant bits as the 7 least significant bits of the current unsigned integer.
|
/// We take the 7 least significant bits as the 7 least significant bits of the current unsigned integer.
|
||||||
|
@ -142,7 +142,7 @@ impl<'b> Decoder<'b> {
|
||||||
Ok(final_word)
|
Ok(final_word)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Decode a word of any size.
|
/// Decode a word of 128 bits size.
|
||||||
/// This is byte alignment agnostic.
|
/// This is byte alignment agnostic.
|
||||||
/// First we decode the next 8 bits of the buffer.
|
/// First we decode the next 8 bits of the buffer.
|
||||||
/// We take the 7 least significant bits as the 7 least significant bits of the current unsigned integer.
|
/// We take the 7 least significant bits as the 7 least significant bits of the current unsigned integer.
|
||||||
|
|
|
@ -98,7 +98,7 @@ impl Encoder {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Encode an integer of any size.
|
/// Encode an integer of 128 bits size.
|
||||||
/// This is byte alignment agnostic.
|
/// This is byte alignment agnostic.
|
||||||
/// First we use zigzag once to double the number and encode the negative sign as the least significant bit.
|
/// First we use zigzag once to double the number and encode the negative sign as the least significant bit.
|
||||||
/// Next we encode the 7 least significant bits of the unsigned integer. If the number is greater than
|
/// Next we encode the 7 least significant bits of the unsigned integer. If the number is greater than
|
||||||
|
@ -165,7 +165,7 @@ impl Encoder {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Encode a unsigned integer of any size.
|
/// Encode a unsigned integer of 128 bits size.
|
||||||
/// This is byte alignment agnostic.
|
/// This is byte alignment agnostic.
|
||||||
/// We encode the 7 least significant bits of the unsigned byte. If the char value is greater than
|
/// We encode the 7 least significant bits of the unsigned byte. If the char value is greater than
|
||||||
/// 127 we encode a leading 1 followed by repeating the above for the next 7 bits and so on.
|
/// 127 we encode a leading 1 followed by repeating the above for the next 7 bits and so on.
|
||||||
|
|
Loading…
Reference in New Issue