Home
last modified time | relevance | path

Searched refs:encode (Results 1 - 25 of 32) sorted by relevance

12

/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/representation/
H A Dencoder.rs24 /// Encoder implementation for decoding representation. The encode interface
65 pub(crate) fn encode(&mut self, dst: &mut [u8], use_huffman: bool) -> usize {
76 match state.encode(&mut dst[cur..]) {
92 Some(TableIndex::Header(index)) => Indexed::new(index).encode(&mut dst[cur..]),
96 Indexing::new(index, v.into_bytes(), use_huffman).encode(&mut dst[cur..])
106 .encode(&mut dst[cur..])
227 pub(crate) fn encode(self, dst: &mut [u8]) -> Result<usize, Self> {
229 Self::Indexed(s) => s.encode(dst),
230 Self::Indexing(s) => s.encode(dst),
231 Self::IndexingWithName(s) => s.encode(ds
254 fn encode(self, dst: &mut [u8]) -> Result<usize, ReprEncodeState> { encode() functions
277 fn encode(self, dst: &mut [u8]) -> Result<usize, ReprEncodeState> { encode() functions
300 fn encode(self, dst: &mut [u8]) -> Result<usize, ReprEncodeState> { encode() functions
323 fn encode(self, dst: &mut [u8]) -> Result<usize, ReprEncodeState> { encode() functions
346 fn encode(self, dst: &mut [u8]) -> Result<usize, ReprEncodeState> { encode() functions
369 fn encode(self, dst: &mut [u8]) -> Result<usize, ReprEncodeState> { encode() functions
392 fn encode(self, dst: &mut [u8]) -> Result<usize, ReprEncodeState> { encode() functions
440 fn encode(mut self, dst: &mut [u8]) -> Result<usize, Self> { encode() functions
483 fn encode(mut self, dst: &mut [u8]) -> Result<usize, Self> { encode() functions
511 fn encode(mut self, dst: &mut [u8]) -> Result<usize, Self> { encode() functions
545 fn encode(mut self, dst: &mut [u8]) -> Result<usize, Self> { encode() functions
[all...]
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/
H A Dbase64.rs16 pub(crate) fn encode(input: &[u8]) -> Vec<u8> {
52 use crate::util::base64::encode;
54 /// UT test cases for `base64::encode`.
57 /// 1. Calls `encode` to parse the string and convert it into `base64`
62 assert_eq!(encode(b"this is an example"), b"dGhpcyBpcyBhbiBleGFtcGxl"); in ut_util_base64_encode()
63 assert_eq!(encode(b"hello"), b"aGVsbG8="); in ut_util_base64_encode()
64 assert_eq!(encode(b""), b""); in ut_util_base64_encode()
65 assert_eq!(encode(b"a"), b"YQ=="); in ut_util_base64_encode()
66 assert_eq!(encode(b"ab"), b"YWI="); in ut_util_base64_encode()
67 assert_eq!(encode( in ut_util_base64_encode()
[all...]
H A Dproxy.rs23 use crate::util::base64::encode;
77 let auth = encode(format!("{username}:{password}").as_bytes());
/commonlibrary/rust/ylong_http/ylong_http/src/h1/request/
H A Dencoder.rs44 //! let size = encoder.encode(&mut buf).unwrap();
49 //! let size = encoder.encode(&mut buf).unwrap();
54 //! let size = encoder.encode(&mut buf).unwrap();
72 /// A encoder that is used to encode request message in `HTTP/1` format.
74 /// This encoder supports you to use the encode method multiple times to output
102 /// let size = encoder.encode(&mut buf).unwrap();
107 /// let size = encoder.encode(&mut buf).unwrap();
112 /// let size = encoder.encode(&mut buf).unwrap();
241 /// let size = encoder.encode(&mut buf).unwrap();
251 pub fn encode( functions
429 fn encode(&mut self, buf: &mut [u8]) -> TokenResult<usize> { encode() functions
460 fn encode(&mut self, buf: &mut [u8]) -> TokenResult<usize> { encode() functions
482 fn encode(&mut self, buf: &mut [u8]) -> TokenResult<usize> { encode() functions
533 fn encode(&mut self, buf: &mut [u8]) -> TokenResult<usize> { encode() functions
622 fn encode(&mut self, buf: &mut [u8]) -> TokenResult<usize> { encode() functions
638 fn encode(&mut self, buf: &mut [u8]) -> TokenResult<usize> { encode() functions
[all...]
/commonlibrary/ets_utils/js_api_module/buffer/
H A Djs_buffer.cpp80 EncodingType Buffer::GetEncodingType(std::string encode) in GetEncodingType() argument
82 if (encode == "hex") { in GetEncodingType()
84 } else if (encode == "base64url") { in GetEncodingType()
86 } else if (encode == "ascii") { in GetEncodingType()
88 } else if (encode == "base64") { in GetEncodingType()
90 } else if (encode == "latin1") { in GetEncodingType()
92 } else if (encode == "binary") { in GetEncodingType()
94 } else if (encode == "utf16le") { in GetEncodingType()
/test/xts/acts/graphic/acts_drawing_native/
H A DDrawingNativeTextBlobTest.cpp141 for (OH_Drawing_TextEncoding encode : encodeArray) { in HWTEST_F()
143 if (encode == TEXT_ENCODING_UTF8) { in HWTEST_F()
145 } else if (encode == TEXT_ENCODING_UTF16) { in HWTEST_F()
147 } else if (encode == TEXT_ENCODING_UTF32) { in HWTEST_F()
149 } else if (encode == TEXT_ENCODING_GLYPH_ID) { in HWTEST_F()
152 OH_Drawing_TextBlob *textBlob = OH_Drawing_TextBlobCreateFromText(str, byteLength, font, encode); in HWTEST_F()
397 for (OH_Drawing_TextEncoding encode : encodeArray) { in HWTEST_F()
398 OH_Drawing_TextBlob *textBlob = OH_Drawing_TextBlobCreateFromString(str, font, encode); in HWTEST_F()
H A DDrawingNativeFontTest.cpp582 for (OH_Drawing_TextEncoding encode : encodes) { in HWTEST_F()
583 int count = OH_Drawing_FontCountText(font, str, strlen(str), encode); in HWTEST_F()
584 switch (encode) { in HWTEST_F()
707 for (OH_Drawing_TextEncoding encode : encodes) { in HWTEST_F()
708 int count = OH_Drawing_FontCountText(font, str, strlen(str), encode); in HWTEST_F()
709 OH_Drawing_FontTextToGlyphs(font, str, strlen(str), encode, glyphs, count); in HWTEST_F()
/commonlibrary/rust/ylong_http/ylong_http/src/h2/
H A Dencoder.rs154 let payload_size = self.hpack_encoder.encode(&mut self.header_payload_buffer); in set_frame()
184 pub fn encode(&mut self, buf: &mut [u8]) -> Result<usize, FrameEncoderErr> { in encode() functions
370 let payload_size = self.hpack_encoder.encode(&mut self.header_payload_buffer); in read_rest_payload()
661 Ok(0) // No padding to encode, so return 0 bytes written. in encode_padding()
1353 let first_encoded = encoder.encode(&mut first_buf).unwrap(); in ut_data_frame_encoding()
1354 let second_encoded = encoder.encode(&mut second_buf).unwrap(); in ut_data_frame_encoding()
1396 let first_encoded = frame_encoder.encode(&mut buf).unwrap(); in ut_headers_frame_encoding()
1436 let first_encoded = encoder.encode(&mut first_buf).unwrap(); in ut_settings_frame_encoding()
1438 let second_encoded = encoder.encode(&mut second_buf).unwrap(); in ut_settings_frame_encoding()
1439 let third_encoded = encoder.encode( in ut_settings_frame_encoding()
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/
H A Dmod.rs21 mod encode; modules
31 pub use encode::{MimeMultiEncoder, MimePartEncoder};
/commonlibrary/rust/ylong_http/ylong_http/src/h2/hpack/
H A Dencoder.rs47 /// Users can call `encode` multiple times to encode the previously set
49 pub(crate) fn encode(&mut self, dst: &mut [u8]) -> usize {
52 let size = encoder.encode(dst, self.use_huffman);
87 cur += _encoder.encode(&mut vec[cur..]); in ut_hpack_encoder()
/commonlibrary/ets_utils/js_util_module/util/
H A Dnative_module_util.cpp724 DECLARE_NAPI_FUNCTION("encode", Encode), in Create()
739 DECLARE_NAPI_FUNCTION("encode", Encode), in TextcoderInit()
940 int32_t encode = 0; in EncodeToStringHelper() local
941 NAPI_CALL(env, napi_get_value_int32(env, args[1], &encode)); in EncodeToStringHelper()
942 Type typeValue = static_cast<Type>(encode); in EncodeToStringHelper()
958 int32_t encode = 0; in EncodeBase64Helper() local
959 NAPI_CALL(env, napi_get_value_int32(env, args[1], &encode)); in EncodeBase64Helper()
960 Type typeValue = static_cast<Type>(encode); in EncodeBase64Helper()
975 int32_t encode = 0; in EncodeAsyncHelper() local
976 NAPI_CALL(env, napi_get_value_int32(env, args[1], &encode)); in EncodeAsyncHelper()
989 int32_t encode = 0; EncodeToStringAsyncHelper() local
1004 int32_t encode = 0; DecodeBase64Helper() local
1022 int32_t encode = 0; DecodeAsyncHelper() local
[all...]
/test/testfwk/xdevice/plugins/ohos/src/ohos/environment/
H A Ddmlib.py474 remote_path_content = remote.encode(DEFAULT_ENCODING)
569 remote_path_content = remote.encode(DEFAULT_ENCODING)
571 remote_path_content = remote.encode("UTF-8")
644 path = path.encode(DEFAULT_ENCODING)
646 path = path.encode("UTF-8")
655 mode_content = mode_str.encode(DEFAULT_ENCODING)
900 req = req.encode("utf-8")
940 req = req.encode(DEFAULT_ENCODING)
1041 connect_key = connect_key.encode("utf-8")
H A Ddmlib_lite.py151 telnet.write(command.encode('ascii') + b"\n")
362 command = command.encode("utf-8")
382 command = command.encode("utf-8")
/commonlibrary/rust/ylong_http/ylong_http/src/h3/
H A Dencoder.rs86 /// let message = encoder.encode(0, &mut res, &mut ins).unwrap();
177 /// let message = encoder.encode(0, &mut res, &mut ins).unwrap();
179 pub fn encode( in encode() functions
419 let message = qpack_encoder.encode(self.stream_id); in encode_headers_with_qpack()
422 // encode headers frame payload length in encode_headers_with_qpack()
442 // finish encode headers in encode_headers_repr()
468 // finish encode headers in encode_qpack_inst()
670 let res = encoder.encode(0, &mut data_buf, &mut inst_buf); in ut_encoder_request_stream_settings()
694 let (data_idx, inst_idx) = encoder.encode(1, &mut data_buf, &mut inst_buf).unwrap(); in ut_encoder_control_stream_settings()
725 let (data_idx, inst_idx) = encoder.encode( in ut_encoder_request_stream_header()
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/body/
H A Dchunk.rs32 /// A chunk body is used to encode body to send message by chunk in `HTTP/1.1`
35 /// This chunk body encoder supports you to use the chunk encode method multiple
92 // Data encode is processing
94 // Data encode is completed
96 // Data encode is finished and return result
133 let (output_size, var) = self.encode_status.encode(src, dst); in chunk_encode()
372 let (output_size, var) = self.encode_status.encode( in chunk_encode_reader()
391 match self.trailer.encode(src.as_slice(), dst) { in trailer_encode()
448 fn encode(&mut self, src: &[u8], dst: &mut [u8]) -> (usize, Option<StatusVar>) { in encode() functions
467 match self.hex.encode(ds in meta_size_encode()
583 fn encode(&mut self, buf: &mut [u8]) -> Token<usize> { encode() functions
599 fn encode(&mut self, buf: &mut [u8]) -> Token<usize> { encode() functions
615 fn encode(&mut self, src: &[u8], buf: &mut [u8]) -> Token<usize> { encode() functions
[all...]
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/
H A Dencoder.rs34 // Headers to be encode.
113 SetCap::new(new_cap).encode(encoder_buf); in update_max_dynamic_table_cap()
202 pub fn encode(&mut self, stream_id: u64) -> EncodeMessage { in encode() functions
H A Dinteger.rs33 pub(crate) fn encode(mut self, dst: &mut Vec<u8>) {
H A Ddecoder.rs334 ack.encode(&mut res); in finish()
358 ack.encode(&mut res); in stream_cancel()
/test/testfwk/xdevice/src/xdevice/_core/report/
H A Dencrypt.py68 plain_text = str(content).encode(encoding='utf-8')
104 cipher_text = str(content).encode()
/test/xts/acts/commonlibrary/ets_utils/util_lib_standard/entry/src/ohosTest/js/test/
H A Dutil.test.js1629 result = that.encode('abc')
1645 result = that.encode('\uD800楼楼')
1661 result = that.encode('a\uD800楼楼')
1677 result = that.encode('abc\uD800楼楼')
1693 result = that.encode('123\uD800楼楼')
1710 result = that.encode('123¥\uD800楼')
1726 result = that.encode('¥¥')
1742 result = that.encode('$$')
1758 result = that.encode('abc哈哈熠熠')
1778 result = that.encode('ab
[all...]
/commonlibrary/rust/ylong_json/src/
H A Dencoder.rs37 pub(crate) fn encode(&mut self, value: &JsonValue) -> Result<(), Error> {
177 pub(crate) fn encode(&mut self, value: &JsonValue) -> Result<(), Error> {
401 assert!(encoder.encode(&value).is_ok());
414 /// 3. Uses `encoder` to encode `json_value`.
469 /// 3. Uses `encoder` to encode `json_value`.
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/ssl/
H A Dstream.rs28 use crate::util::base64::encode;
310 let base64_digest = encode(digest); in compare_pinned_digest()
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/h2/
H A Dinput.rs157 let size = self.encoder.encode(&mut self.buf.buf).map_err(|_| {
/commonlibrary/rust/ylong_http/ylong_http/src/body/mime/common/
H A Dheaders.rs56 // when the encode stage go to next
99 pub(crate) fn encode(&mut self, dst: &mut [u8]) -> TokenResult<usize> {
/commonlibrary/rust/ylong_http/ylong_http/src/h3/qpack/format/
H A Dencoder.rs55 Integer::index(0x00, wire_ric, 0xff).encode(prefix_buf); in get_prefix()
58 Integer::index(0x00, base - required_insert_count, 0x7f).encode(prefix_buf); in get_prefix()
60 Integer::index(0x80, required_insert_count - base - 1, 0x7f).encode(prefix_buf); in get_prefix()
63 Integer::index(0x00, wire_ric, 0xff).encode(prefix_buf); in get_prefix()
64 Integer::index(0x00, 0, 0x7f).encode(prefix_buf); in get_prefix()
119 Indexed::new(index, true).encode(fields); in encode_field()
123 .encode(fields); in encode_field()
159 .encode(fields); in encode_field()
168 .encode(fields); in encode_field()
177 IndexedWithPost::new(index - (self.base as usize)).encode(field in indexed_dynamic_field()
320 fn encode(self, dst: &mut Vec<u8>) { encode() functions
348 fn encode(self, dst: &mut Vec<u8>) { encode() functions
368 fn encode(self, dst: &mut Vec<u8>) { encode() functions
398 fn encode(self, dst: &mut Vec<u8>) { encode() functions
443 fn encode(self, dst: &mut Vec<u8>) { encode() functions
473 fn encode(self, dst: &mut Vec<u8>) { encode() functions
512 fn encode(self, dst: &mut Vec<u8>) { encode() functions
542 fn encode(self, dst: &mut Vec<u8>) { encode() functions
580 fn encode(mut self, dst: &mut Vec<u8>) { encode() functions
621 fn encode(mut self, dst: &mut Vec<u8>) { encode() functions
804 fn encode(self, dst: &mut Vec<u8>) { encode() functions
[all...]

Completed in 25 milliseconds

12