Import std.compress.deflate
Gzip
struct
Public Struct Gzip
Gzip's bytes, of .gz files and HTTP's gzip: Deflate's, with a header and a CRC-32 checksum.
Examples
Local data = "the same words, the same words, the same words".Bytes
Local gz = Gzip.Compress(data, 9)
Expect(gz[0] == 0x1F && gz[1] == 0x8B)
Local unpacked = Try Gzip.Decompress(gz)
Expect(unpacked == data)std/compress/deflate.fb, line 127
-
@PanicsAtCaller Public Static Method Compress(data: UInt8[], level: Int = 6): UInt8[]static method #The
data, compressed at thelevel, as one member. Panics when thelevelisn't from 0 to 9. -
@PanicsAtCaller Public Static Method Decompress(data: UInt8[], limit: Int = MOST_BYTES): UInt8[] Throws IOErrorstatic method #The bytes the
datais compressed from, each member's after the last's, or an IOError when it isn't Gzip's, ends early, or would come to more thanlimitbytes. Panics when thelimitis negative.
Report an issue with this page or with FutureBlitz on GitHub.