httlib_huffman/decoder/speed.rs
1/// Provides available decoding speed options which represent the number of bits
2/// that the decoder can read at a time.
3#[derive(Clone, Copy, Debug, PartialEq)]
4pub enum DecoderSpeed {
5 OneBit = 1,
6 TwoBits = 2,
7 ThreeBits = 3,
8 FourBits = 4,
9 FiveBits = 5,
10}
11
12impl DecoderSpeed {
13 /// Returns a vector of all available decoding speed options.
14 pub fn known() -> Vec<DecoderSpeed> {
15 vec![
16 DecoderSpeed::OneBit,
17 DecoderSpeed::TwoBits,
18 DecoderSpeed::ThreeBits,
19 DecoderSpeed::FourBits,
20 DecoderSpeed::FiveBits,
21 ]
22 }
23}