Home
last modified time | relevance | path

Searched refs:byte (Results 1 - 13 of 13) sorted by relevance

/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/
H A Dmod.rs62 pub(crate) fn from_u8(byte: u8) -> Self {
63 match byte {
95 pub(crate) fn from_u8(byte: u8) -> Self {
96 match byte {
113 pub(crate) fn prefix_midbit_value(&self, byte: u8) -> MidBit {
117 t: Some((byte & 0x40) != 0),
123 h: Some((byte & 0x20) != 0),
147 /// Creates a `PrefixBit` from a byte. The interface will convert the
148 /// incoming byte to the most suitable prefix bit.
149 pub(crate) fn from_u8(byte
[all...]
H A Dinteger.rs35 if let Some(byte) = self.int.next_byte() {
36 dst.push(byte)
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;
62 /// Continues computing the integer based on the next byte of the input.
65 pub(crate) fn next_byte(&mut self, byte: u8) -> Result<Option<usize>, QpackError> {
68 .and_then(|res| res.checked_mul((byte & 0x7f) as usize))
72 match (byte & 0x80) == 0x00 {
112 /// Gets the next byte o
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/request/uri/
H A Dpercent_encoding.rs265 for (index, &byte) in u8_str.as_bytes().iter().enumerate() {
266 if should_percent_encoding(byte, char_set) {
272 let encoded = percent_hex(byte);
318 pub(crate) fn should_percent_encoding(byte: u8, bytes: &[u8]) -> bool {
319 !bytes.is_ascii() || byte < 0x20 || byte == 0x7f || byte >= 0x80 || bytes.contains(&byte)
322 pub(crate) fn percent_hex(byte: u8) -> &'static str {
341 let index = usize::from(byte) *
[all...]
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/io/
H A Dasync_buf_read.rs106 fn read_until<'a>(&'a mut self, byte: u8, buf: &'a mut Vec<u8>) -> ReadUtilTask<'a, Self> in read_until()
110 ReadUtilTask::new(self, byte, buf) in read_until()
142 fn split(self, byte: u8) -> SplitTask<Self> in split()
146 SplitTask::new(self, byte) in split()
/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;
66 /// Continues computing the integer based on the next byte of the input.
69 pub(crate) fn next_byte(&mut self, byte: u8) -> Result<Option<usize>, H2Error> {
72 .and_then(|res| res.checked_mul((byte & 0x7f) as usize))
76 match (byte & 0x80) == 0x00 {
122 /// Gets the next byte of the integer. If no remaining bytes are calculated,
219 ($int: expr, $mask: expr, $pre: expr $(, $byte: expr)* $(,)? ) => { in ut_integer_encode()
222 assert_eq!(integer.next_byte(), Some($byte)); in ut_integer_encode()
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/format/
H A Dencoder.rs742 let byte = buf[0]; in decode()
743 let inst = DecoderInstPrefixBit::from_u8(byte); in decode()
748 match IntegerDecoder::first_byte(byte, mask.0) { in decode()
777 let byte = buf[0]; in decode()
780 match self.index.next_byte(byte) { in decode()
H A Ddecoder.rs375 let byte = buf[buf_index - 1]; in decode()
376 let signal = (byte & 0x80) != 0; in decode()
378 let delta_base = match IntegerDecoder::first_byte(byte, mask.0) { in decode()
/commonlibrary/rust/ylong_http/ylong_http/src/huffman/
H A Dmod.rs75 for byte in src.iter() {
76 let (nbits, code) = HUFFMAN_ENCODE[*byte as usize];
110 // At the end of character decoding, if the last byte is not completely
147 // byte sequence.
150 // value is 0. Every time we take out 4 bits from the byte sequence that
152 // will get `state`, `byte` and `flags`. We can judge the current state
160 // are parsed and the last byte can be the terminator. The remaining bits are
178 for byte in src.iter() { in huffman_decode_inner()
179 let left = byte >> 4; in huffman_decode_inner()
180 let right = byte in huffman_decode_inner()
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/representation/
H A Dmod.rs276 /// Creates a `PrefixBit` from a byte. The interface will convert the
277 /// incoming byte to the most suitable prefix bit.
278 pub(crate) fn from_u8(byte: u8) -> Self {
279 match byte {
/commonlibrary/c_utils/base/src/
H A Dunicode_ex.cpp219 * return 1-4 by first byte
231 static inline void Utf8ShiftAndMask(uint32_t* codePoint, const uint8_t byte) in Utf8ShiftAndMask() argument
234 *codePoint |= 0x3F & byte; in Utf8ShiftAndMask()
/commonlibrary/rust/ylong_json/src/
H A Dserializer_compact.rs155 // Serialize a byte array into an array of bytes.
156 // Binary formats will typically represent byte arrays more compactly.
159 for byte in v { in serialize_bytes()
160 seq.serialize_element(byte)?; in serialize_bytes()
H A Dstates.rs490 fn utf8_first_byte(byte: u8, width: u32) -> u32 { in utf8_first_byte()
491 (byte & (0x7F >> width)) as u32 in utf8_first_byte()
495 fn utf8_acc_cont_byte(ch: u32, byte: u8) -> u32 { in utf8_acc_cont_byte()
496 (ch << 6) | (byte & CONT_MASK) as u32 in utf8_acc_cont_byte()
/commonlibrary/ets_utils/js_api_module/buffer/test/
H A Dtest_napi.cpp1226 * @tc.desc: Get a byte in blob
1236 uint8_t byte = blob->GetByte(2); in HWTEST_F() local
1238 ASSERT_EQ(byte, 3); in HWTEST_F()
1307 // one byte in HWTEST_F()

Completed in 13 milliseconds