Skip to main content

encode_with_options

Function encode_with_options 

Source
pub fn encode_with_options(data: &[u8], allow_compression: bool) -> String
Expand description

将字节切片编码为 DX 格式,可选择是否启用压缩

§参数

  • data - 要编码的字节数据
  • allow_compression - 是否允许压缩

§返回值

以 ‘dx’ 为前缀的编码字符串