libdeflate extension for Rebol3 (version 3.20.5 and higher)
deflate: import deflate
bin: deflate/compress mold system
str: deflate/decompress bin
Because this extension replaces existing deflate, zlib and gzip compression methods, one can use also simple:
bin: compress mold system 'zlib
str: decompress bin 'zlibStreaming API is not part of this extension. Use Rebol/Zlib-ng instead, if needed.
Native Deflate version
Compress data using Deflate
data[binary! any-string!]Input data to compress./partLimit the input data to a given length.length[integer!]Length of input data./levelquality[integer!]Compression level from 1 to 9./zlibAssumes the zlib wrapper format/gzipAssumes the gzip wrapper format
Decompress data using Deflate
data[binary! any-string!]Input data to decompress./partLimit the input data to a given length.length[integer!]Length of input data./sizeLimit the output size.bytes[integer!]Maximum number of uncompressed bytes./zlibAssumes the zlib wrapper format/gzipAssumes the gzip wrapper format
