Skip to content

Oldes/Rebol-Deflate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rebol-deflate

Rebol-Deflate CI Gitter Zulip

Rebol/Deflate

libdeflate extension for Rebol3 (version 3.20.5 and higher)

Basic Usage

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 'zlib

Streaming API is not part of this extension. Use Rebol/Zlib-ng instead, if needed.

Extension commands:

version

Native Deflate version

compress :data

Compress data using Deflate

  • data [binary! any-string!] Input data to compress.
  • /part Limit the input data to a given length.
  • length [integer!] Length of input data.
  • /level
  • quality [integer!] Compression level from 1 to 9.
  • /zlib Assumes the zlib wrapper format
  • /gzip Assumes the gzip wrapper format

decompress :data

Decompress data using Deflate

  • data [binary! any-string!] Input data to decompress.
  • /part Limit the input data to a given length.
  • length [integer!] Length of input data.
  • /size Limit the output size.
  • bytes [integer!] Maximum number of uncompressed bytes.
  • /zlib Assumes the zlib wrapper format
  • /gzip Assumes the gzip wrapper format