struct InflateResult
XuAPI
pub struct InflateResult {
pub data string
pub next_pos int
}用途
承载 data、next_pos 等属性的结构体。
公开字段
datastring- 数据
next_posint- 字段(int)
#compress/flateinflate 与有界 LZ77、固定 Huffman deflate;不可压缩数据使用存储块回退。
struct InflateResultpub struct InflateResult {
pub data string
pub next_pos int
}承载 data、next_pos 等属性的结构体。
data stringnext_pos intinflatepub fn inflate(src &string) string解压 DEFLATE 压缩数据流,还原为原始字节串。失败时抛出错误,调用方需处理或继续传播。
src &stringstring — 结果字符串
inflate_limitpub fn inflate_limit(src &string, limit int) string执行 inflate limit 操作。失败时抛出错误,调用方需处理或继续传播。
src &stringlimit intstring — 结果字符串
inflate_from_limitpub fn inflate_from_limit(src &string, start int, limit int) InflateResult执行 inflate from limit 操作。失败时抛出错误,调用方需处理或继续传播。
src &stringstart intlimit intInflateResult — 该类型的值
deflatepub fn deflate(src &string) string将输入数据压缩为标准 DEFLATE 格式字节流。
src &stringstring — 结果字符串