/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/representation/ |
H A D | encoder.rs | 55 /// written to `dst` and the length of the decoded content will be returned. 57 /// If the `dst` is full, users can call this method again after preparing a 65 pub(crate) fn encode(&mut self, dst: &mut [u8], use_huffman: bool) -> usize { 66 // If `dst` is empty, leave the state unchanged. 67 if dst.is_empty() { 71 // `cur` is used to record the current write position of `dst`. 76 match state.encode(&mut dst[cur..]) { 79 // If `dst` is not long enough, save the current state. 81 return dst.len(); 92 Some(TableIndex::Header(index)) => Indexed::new(index).encode(&mut dst[cu 533 let mut dst = Vec::with_capacity(src.len()); new() variables [all...] |
/commonlibrary/rust/ylong_http/ylong_http/src/h1/request/ |
H A D | encoder.rs | 251 pub fn encode(&mut self, dst: &mut [u8]) -> Result<usize, HttpError> { in encode() 252 if dst.is_empty() { in encode() 256 while count != dst.len() { in encode() 258 EncodeState::Method => self.method_encode(&mut dst[count..]), in encode() 259 EncodeState::MethodSp => self.method_sp_encode(&mut dst[count..]), in encode() 260 EncodeState::Uri => self.uri_encode(&mut dst[count..]), in encode() 261 EncodeState::UriSp => self.uri_sp_encode(&mut dst[count..]), in encode() 262 EncodeState::Version => self.version_encode(&mut dst[count..]), in encode() 263 EncodeState::VersionCrlf => self.version_crlf_encode(&mut dst[count..]), in encode() 264 EncodeState::Header => self.header_encode(&mut dst[coun in encode() [all...] |
/commonlibrary/rust/ylong_http/ylong_http/src/huffman/ |
H A D | mod.rs | 44 pub(crate) fn huffman_encode(src: &[u8], dst: &mut Vec<u8>) { 84 dst.extend_from_slice(&state.to_be_bytes()); 103 dst.extend_from_slice(&state.to_be_bytes()); 117 dst.extend_from_slice(&bytes.as_slice()[..len]); 127 pub(crate) fn huffman_decode(src: &[u8], dst: &mut Vec<u8>) -> Result<(), HuffmanDecodeError> { 155 let (state, flags) = huffman_decode_inner(src, dst, 0, 0)?; 172 dst: &mut Vec<u8>, in huffman_decode_inner() 187 dst.push(_result); in huffman_decode_inner() 195 dst.push(_result); in huffman_decode_inner()
|
/commonlibrary/memory_utils/libpurgeablemem/test/ |
H A D | purgeable_memory_test.cpp | 34 char dst; member 42 bool ModifyData(void *data, size_t size, char src, char dst); 138 bool ModifyData(void *data, size_t size, char src, char dst) in ModifyData() argument 144 str[i] = dst; in ModifyData() 154 std::cout << "inter " << __func__ << ": " << para->src << "->" << para->dst << in ModifyAlphabetX2Y() 156 bool ret = ModifyData(data, size, para->src, para->dst); in ModifyAlphabetX2Y()
|
H A D | purgeable_c_test.cpp | 34 char dst; member 42 bool ModifyData(void *data, size_t size, char src, char dst); 199 bool ModifyData(void *data, size_t size, char src, char dst) in ModifyData() argument 205 str[i] = dst; in ModifyData() 215 std::cout << "inter " << __func__ << ": " << para->src << "->" << para->dst << in ModifyAlphabetX2Y() 217 bool ret = ModifyData(data, size, para->src, para->dst); in ModifyAlphabetX2Y()
|
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/format/ |
H A D | encoder.rs | 299 pub(crate) fn encode(self, dst: &mut Vec<u8>) { 300 self.capacity.encode(dst) 320 fn encode(self, dst: &mut Vec<u8>) { in encode() 321 self.index.encode(dst) in encode() 348 fn encode(self, dst: &mut Vec<u8>) { in encode() 349 self.index.encode(dst) in encode() 368 fn encode(self, dst: &mut Vec<u8>) { in encode() 369 self.index.encode(dst) in encode() 398 fn encode(self, dst: &mut Vec<u8>) { in encode() 399 self.inner.encode(dst) in encode() 796 let mut dst = Vec::with_capacity(src.len()); new() variables [all...] |
/commonlibrary/c_utils/base/test/fuzztest/string_fuzzer/ |
H A D | string_fuzzer.cpp | 36 string dst = dataProvider->ConsumeRandomLengthString(MAX_STRING_LENGTH); in StringTestFunc() local 37 ReplaceStr(str, src, dst); in StringTestFunc()
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/io/ |
H A D | async_read.rs | 167 fn read_to_string<'a>(&'a mut self, dst: &'a mut String) -> ReadToStringTask<'a, Self> { in read_to_string() 168 ReadToStringTask::new(self, dst) in read_to_string()
|
/commonlibrary/rust/ylong_http/ylong_http/src/body/ |
H A D | chunk.rs | 131 fn chunk_encode(&mut self, src: &[u8], dst: &mut [u8]) -> usize { in chunk_encode() 133 let (output_size, var) = self.encode_status.encode(src, dst); in chunk_encode() 164 fn chunk_encode(&mut self, dst: &mut [u8]) -> usize { in chunk_encode() 165 self.chunk_encode_reader(dst) in chunk_encode() 170 fn chunk_encode(&mut self, dst: &mut [u8]) -> usize { in chunk_encode() 171 self.chunk_encode_reader(dst) in chunk_encode() 327 fn bytes_encode(&mut self, dst: &mut [u8]) -> usize { in bytes_encode() 340 self.chunk_encode(src, dst) in bytes_encode() 370 fn chunk_encode_reader(&mut self, dst: &mut [u8]) -> usize { in chunk_encode_reader() 374 dst, in chunk_encode_reader() [all...] |
/commonlibrary/ets_utils/js_api_module/convertxml/test/ |
H A D | test_convertxml.h | 35 static void Replace(napi_env env, std::string &str, const std::string src, const std::string dst); 94 void CxmlTest::Replace(napi_env env, std::string &str, const std::string src, const std::string dst) in Replace() argument 97 convert.Replace(str, src, dst); in Replace()
|
H A D | test_convertxml.cpp | 798 std::string dst = "zyy"; in HWTEST_F() local 799 CxmlTest::Replace(env, str, src, dst); in HWTEST_F()
|
/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/ |
H A D | encoder.rs | 49 pub(crate) fn encode(&mut self, dst: &mut [u8]) -> usize { 52 let size = encoder.encode(dst, self.use_huffman); 53 if size == dst.len() {
|
/commonlibrary/rust/ylong_runtime/ylong_runtime/src/executor/ |
H A D | queue.rs | 88 pub(crate) fn steal_into(&self, dst: &LocalQueue) -> Option<Task> { 89 self.inner.steal_into(dst) 341 pub(crate) fn steal_into(&self, dst: &LocalQueue) -> Option<Task> { 343 let mut dst_rear = unsafe { non_atomic_load(&dst.inner.rear) }; 344 if dst.is_half_full(dst_rear) { 392 let ptr = dst.inner.buffer[des_idx].get(); 406 dst.inner.rear.store(dst_rear, SeqCst);
|
/commonlibrary/c_utils/base/test/benchmarktest/string_benchmark_test/ |
H A D | string_benchmark_test.cpp | 142 * CaseDescription: test for replace src with dst int strBase 150 string dst = "with"; in BENCHMARK_F() local 152 string result = ReplaceStr(strBase, src, dst); in BENCHMARK_F() 156 dst = "test"; in BENCHMARK_F() 158 result = ReplaceStr(strBase, src, dst); in BENCHMARK_F() 162 dst = "test"; in BENCHMARK_F() 163 result = ReplaceStr(strBase, src, dst); in BENCHMARK_F() 167 dst = ""; in BENCHMARK_F() 169 result = ReplaceStr(strBase, src, dst); in BENCHMARK_F()
|
/commonlibrary/c_utils/base/test/unittest/common/ |
H A D | utils_string_test.cpp | 114 * CaseDescription: test for replace src with dst int strBase 120 string dst = "with"; in HWTEST_F() local 122 string result = ReplaceStr(strBase, src, dst); in HWTEST_F() 126 dst = "test"; in HWTEST_F() 128 result = ReplaceStr(strBase, src, dst); in HWTEST_F() 132 dst = "test"; in HWTEST_F() 133 result = ReplaceStr(strBase, src, dst); in HWTEST_F() 137 dst = ""; in HWTEST_F() 139 result = ReplaceStr(strBase, src, dst); in HWTEST_F()
|
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/ |
H A D | integer.rs | 33 pub(crate) fn encode(mut self, dst: &mut Vec<u8>) { 36 dst.push(byte)
|
/commonlibrary/c_utils/base/src/ |
H A D | string_ex.cpp | 45 string ReplaceStr(const string& str, const string& src, const string& dst) in ReplaceStr() argument 54 strTmp.replace(pos, src.length(), dst); in ReplaceStr() 55 pos += dst.length(); in ReplaceStr()
|
/commonlibrary/rust/ylong_http/ylong_http/src/ |
H A D | headers.rs | 238 let mut dst = Vec::new(); in normalize() variables 245 dst.push(b); in normalize() 247 Ok(unsafe { String::from_utf8_unchecked(dst) }) in normalize()
|
/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/common/ |
H A D | headers.rs | 99 pub(crate) fn encode(&mut self, dst: &mut [u8]) -> TokenResult<usize> { 106 match data_copy(&self.src, &mut self.src_idx, dst)? {
|
/commonlibrary/c_utils/base/include/ |
H A D | string_ex.h | 62 * @param dst Indicates the expected substring for replacement. 65 std::string ReplaceStr(const std::string& str, const std::string& src, const std::string& dst);
|
/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/encode/ |
H A D | multi.rs | 212 fn crlf_encode(&mut self, dst: &mut [u8]) -> SizeResult { in crlf_encode() 213 match data_copy(&self.src, &mut self.src_idx, dst)? { in crlf_encode() 226 fn dash_encode(&mut self, dst: &mut [u8]) -> SizeResult { in dash_encode() 227 match data_copy(&self.src, &mut self.src_idx, dst)? { in dash_encode() 239 fn boundary_encode(&mut self, dst: &mut [u8], boundary: Vec<u8>) -> SizeResult { in boundary_encode() 240 match data_copy(&boundary, &mut self.src_idx, dst)? { in boundary_encode() 252 fn headers_encode(&mut self, dst: &mut [u8], mut headers_encoder: EncodeHeaders) -> SizeResult { in headers_encode() 253 match headers_encoder.encode(dst)? { in headers_encode() 267 dst: &mut [u8], in sync_mimepart_encode() 270 let size = sync_impl::Body::data(&mut part_encoder, dst) in sync_mimepart_encode() [all...] |
/commonlibrary/ets_utils/js_api_module/convertxml/ |
H A D | js_convertxml.h | 144 void Replace(std::string &str, const std::string src, const std::string dst) const;
|
H A D | js_convertxml.cpp | 574 void ConvertXml::Replace(std::string &str, const std::string src, const std::string dst) const
in Replace() 578 str.replace(index, src.size(), dst);
in Replace()
|