XU XUv0.16.0

#compress/lzw

import: #compress/lzw

counts: 3 functions, 0 methods, 0 types, 2 constants, 0 method sets

GIF LSB / PDF MSB LZW.

const LSB

XuAPI
pub const LSB = 0

Purpose

Constant LSB, defining protocol or algorithm parameters.

const MSB

XuAPI
pub const MSB = 1

Purpose

Constant MSB, defining protocol or algorithm parameters.

encode

XuAPI
pub fn encode(src &string, order int, lit_width int) string

Purpose

Encode data into output format. 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)
order int
order (int)
lit_width int
lit_width (int)

Returns

string — result string

decode

XuAPI
pub fn decode(src &string, order int, lit_width int) string

Purpose

Decode data from encoded representation. 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)
order int
order (int)
lit_width int
lit_width (int)

Returns

string — result string

decode_limit

XuAPI
pub fn decode_limit(src &string, order int, lit_width int, limit int) string

Purpose

Decode limit data. 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)
order int
order (int)
lit_width int
lit_width (int)
limit int
limit (int)

Returns

string — result string