Home
last modified time | relevance | path

Searched refs:dst (Results 1 - 23 of 23) sorted by relevance

/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/representation/
H A Dencoder.rs55 /// 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 Dencoder.rs251 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 Dmod.rs44 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 Dpurgeable_memory_test.cpp34 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 Dpurgeable_c_test.cpp34 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 Dencoder.rs299 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 Dstring_fuzzer.cpp36 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 Dasync_read.rs167 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 Dchunk.rs131 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 Dtest_convertxml.h35 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 Dtest_convertxml.cpp798 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 Dencoder.rs49 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 Dqueue.rs88 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 Dstring_benchmark_test.cpp142 * 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 Dutils_string_test.cpp114 * 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 Dinteger.rs33 pub(crate) fn encode(mut self, dst: &mut Vec<u8>) {
36 dst.push(byte)
/commonlibrary/c_utils/base/src/
H A Dstring_ex.cpp45 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 Dheaders.rs238 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 Dheaders.rs99 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 Dstring_ex.h62 * @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 Dmulti.rs212 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 Djs_convertxml.h144 void Replace(std::string &str, const std::string src, const std::string dst) const;
H A Djs_convertxml.cpp574 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()

Completed in 17 milliseconds