compress

Generated by tinox doc

tinox.core.compress, split out of the bundled stdlib as a standalone tinox-central package.

Gzip roundtrip

import tinox.core.compress

class Main
{
    fnc main() -> Int32
    {
        var data: List<Int64> = []
        let text: String = "hello, tinox! hello, tinox!"
        var i: Int64 = 0
        while i < text.len()
        {
            data.push(text.charCodeAt(i))
            i = i + 1
        }

        let compressed: List<Int64> = Compress::gzip(data)
        println("compressed size: " + compressed.len().toString())

        let restored: List<Int64> = Compress::gunzip(compressed)
        println("gunzip ok: " + Compress::lastGunzipOk().toString())
        println("restored size: " + restored.len().toString())
        return 0
    }
}

fn tinoxDeflateRaw(bytes: List<Int64>) → List<Int64>

fn tinoxInflateRaw(bytes: List<Int64>) → List<Int64>

fn wsLastInflateOk() → Bool

fn tinoxGzip(bytes: List<Int64>) → List<Int64>

fn tinoxGunzip(bytes: List<Int64>) → List<Int64>

fn tinoxLastGunzipOk() → Bool

class Compress

Methods

fnc gzip(bytes: List<Int64>) → List<Int64>
fnc gunzip(bytes: List<Int64>) → List<Int64>
fnc lastGunzipOk() → Bool
fnc deflateRaw(bytes: List<Int64>) → List<Int64>
fnc inflateRaw(bytes: List<Int64>) → List<Int64>
fnc lastInflateOk() → Bool