XU XUv0.16.0

#compress/flate

import: #compress/flate

counts: 4 functions, 0 methods, 1 types, 0 constants, 0 method sets

Inflate and bounded LZ77/fixed-Huffman deflate, with stored-block fallback for incompressible data.

struct InflateResult

XuAPI
pub struct InflateResult {
    pub data string
    pub next_pos int
}

Purpose

Structure encapsulating data, next_pos.

Public fields

data string
data
next_pos int
field (int)

inflate

XuAPI
pub fn inflate(src &string) string

Purpose

Decompress DEFLATE data stream. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &string
source (read-only borrow; caller keeps the original; type &string)

Returns

string — result string

inflate_limit

XuAPI
pub fn inflate_limit(src &string, limit int) string

Purpose

A positive limit caps bytes before appending or expanding backreferences. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &string
source (read-only borrow; caller keeps the original; type &string)
limit int
limit (int)

Returns

string — result string

inflate_from_limit

XuAPI
pub fn inflate_from_limit(src &string, start int, limit int) InflateResult

Purpose

Inflate from limit. Throws on failure; handle the error or propagate it to the caller.

Parameters

src &string
source (read-only borrow; caller keeps the original; type &string)
start int
start (int)
limit int
limit (int)

Returns

InflateResult — a value of this type

deflate

XuAPI
pub fn deflate(src &string) string

Purpose

Compress input data using standard DEFLATE algorithm.

Parameters

src &string
source (read-only borrow; caller keeps the original; type &string)

Returns

string — result string