Home
last modified time | relevance | path

Searched refs:mask (Results 1 - 8 of 8) sorted by relevance

/commonlibrary/rust/ylong_runtime/ylong_runtime/src/util/
H A Dbit.rs14 //! Bit mask.
18 /// When using the mask with a binary number for **and** operations, the value
19 /// at the mask position of the binary number can be obtained.
21 /// For example: 0000_1111(mask) & 1010_1010(target number) = 0000_1010
27 /// // On a 64-bit machine, you can get the mask 0xf
28 /// let mask = Mask::new(4, 0);
32 mask: usize,
37 /// Creates a mask. Generates a mask based on the length of consecutive
52 /// let mask
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/
H A Dinteger.rs52 /// Calculates an integer based on the incoming first byte and mask.
55 pub(crate) fn first_byte(byte: u8, mask: u8) -> Result<usize, Self> {
56 let index = byte & mask;
57 match index.cmp(&mask) {
99 mask: u8,
113 pub(crate) fn new(i: usize, mask: u8, pre: u8) -> Self {
116 mask,
127 if self.i < self.mask as usize {
131 self.i -= self.mask as usize;
133 Some(self.pre | self.mask)
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/
H A Dinteger.rs23 pub(crate) fn index(pre: u8, index: usize, mask: u8) -> Self {
25 int: IntegerEncoder::new(pre, index, mask),
48 /// Calculates an integer based on the incoming first byte and mask.
51 pub(crate) fn first_byte(byte: u8, mask: u8) -> Result<usize, Self> {
52 let index = byte & mask;
53 match index.cmp(&mask) {
82 mask: u8,
95 pub(crate) fn new(pre: u8, i: usize, mask: u8) -> Self {
99 mask,
117 if self.i < self.mask a
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/representation/
H A Dencoder.rs428 fn set_index(mut self, index: usize, mask: u8, pre: u8) -> Self { in set_index()
429 self.index = Some(Integer::index(index, mask, pre)); in set_index()
468 fn set_index(mut self, mask: u8, pre: u8) -> Self { in set_index()
469 self.index = Some(Integer::index(0, mask, pre)); in set_index()
499 fn index(index: usize, mask: u8, pre: u8) -> Self { in index()
501 int: IntegerEncoder::new(index, mask, pre), in index()
/commonlibrary/rust/ylong_http/ylong_http/src/huffman/
H A Dmod.rs93 // `mask`:
97 // `rotate` & mask => Parts B
98 // `rotate` & !mask => Parts A
101 let mask = u64::MAX >> (64 - unfilled);
102 state |= rotate & mask;
104 state = rotate & !mask;
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/format/
H A Dencoder.rs568 fn set_index(mut self, pre: u8, index: usize, mask: u8) -> Self { in set_index()
569 self.index = Some(Integer::index(pre, index, mask)); in set_index()
606 fn set_index(mut self, pre: u8, index: usize, mask: u8) -> Self { in set_index()
607 self.index = Some(Integer::index(pre, index, mask)); in set_index()
744 let mask = inst.prefix_index_mask(); in decode()
748 match IntegerDecoder::first_byte(byte, mask.0) { in decode()
H A Ddecoder.rs346 let mask = PrefixMask::REQUIRE_INSERT_COUNT; in decode()
347 let ric = match IntegerDecoder::first_byte(buf[buf_index - 1], mask.0) { in decode()
377 let mask = PrefixMask::DELTA_BASE; in decode()
378 let delta_base = match IntegerDecoder::first_byte(byte, mask.0) { in decode()
429 let mask = prefix.prefix_index_mask(); in decode()
431 match IntegerDecoder::first_byte(buf[buf_index - 1], mask.0) { in decode()
/commonlibrary/c_utils/base/src/
H A Dparcel.cpp377 static const size_t mask[MAX_MASK_NUM] = { 0xFFFFFFFF, 0x00ffffff, 0x0000ffff, 0x000000ff }; in WritePadBytes() local
379 static const size_t mask[MAX_MASK_NUM] = { 0xFFFFFFFF, 0xffffff00, 0xffff0000, 0xff000000 }; in WritePadBytes() local
381 *reinterpret_cast<uint32_t *>(dest + padSize - MAX_MASK_NUM) &= mask[padSize]; in WritePadBytes()

Completed in 7 milliseconds