Skip to content
FutureBlitz

    Install

    Import std.compress.deflate

    Zlib

    std.compress.deflate

    struct

    Public Struct Zlib

    Zlib's bytes: Deflate's, with a header and an Adler-32 checksum.

    Examples

    Local data = "hello, hello, hello, hello".Repeated(100).Bytes
    Local packed = Zlib.Compress(data)
    Expect(packed.Count < data.Count)
    Local unpacked = Try Zlib.Decompress(packed)
    Expect(unpacked == data)

    std/compress/deflate.fb, line 96

    • @PanicsAtCaller Public Static Method Compress(data: UInt8[], level: Int = 6): UInt8[] static method #

      The data, compressed at the level. Panics when the level isn't from 0 to 9.

    • @PanicsAtCaller Public Static Method Decompress(data: UInt8[], limit: Int = MOST_BYTES): UInt8[] Throws IOError static method #

      The bytes the data is compressed from, or an IOError when it isn't Zlib's, ends early, or would come to more than limit bytes. Panics when the limit is negative.

    Report an issue with this page or with FutureBlitz on GitHub.