Qu

range_encode

Builtin index · File I/O

result = range_encode(data)

Input: data · Output: result

What it is

Byte-oriented adaptive range coding of data (a Str, or a Vec of 0-255 byte values). The model adapts as it goes, so nothing but the symbol count travels alongside the payload.

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
result = range_encode(data)
data Str or Vecnot documented yet
bytes Veca Vec of 0-255 coded bytes
symbol_count Numa Num, the input length
Returns a Record with fields bytes (a Vec of 0-255 coded bytes) and symbol_count (a Num, the input length). Empty input gives none rather than a record.

Examples

No documentation example calls this form yet. The File I/O chapter is where one belongs.