Documention for: gzip.r Created by: vincentecuye on: 4-Feb-2013 Format: text/editable Downloaded on: 28-Mar-2024 gzip Author: Vincent Ecuyer Date: 4-Feb-2013 File: %gzip.r ===Purpose Creates gzip archives, using the rebol compress command. ===Usage Compresses a string series into a gzip encoding, and returns the binary result. gzip data /name file *data (any-string! binary!) - Data to compress. */name - Specifies a filename. (optional : default filename is the same as the archive's without the .gz extension) *file (with /name) - The filename to use in archive. ===Examples REBOL 2: my-data: #{........} write/binary %test.gz gzip/name my-data %my-file.txt REBOL 3: my-data: #{........} write %test.gz gzip/name my-data %my-file.txt ===Comment COMPRESS uses a zlib compatible format - always with deflate algorithm, 32k window size, max compression and no dictionary - followed by checksum (4 bytes) and uncompressed data length (4 bytes). For REBOL 2.x, this module uses a precalculated crc table, and for REBOL 3.x, it uses the available 'crc32 checksum method - r3 compress/gzip is bugged (wrong checksum), so it isn't used.