COMPRESS= LIBNAME Statement Option

Specifies the compression of rows in output tables.
Valid in: LIBNAME statement
Default: No
Supports: SAS data set

Syntax

COMPRESS=NO | YES | CHAR | BINARY

Syntax Description

NO
specifies that the rows in a newly created table be uncompressed (fixed-length records).
YES | CHAR
specifies that the rows in a newly created table be compressed (variable-length records) using RLE (Run Length Encoding). RLE compresses rows by reducing repeated consecutive characters (including blanks) to two-byte or three-byte representations.
Tip:Use this compression algorithm for character data.
BINARY
specifies that the rows in a newly created table be compressed (variable-length records) using RDC (Ross Data Compression). RDC combines run-length encoding and sliding-window compression to compress the file.
Interaction:For the COPY procedure, the default value CLONE uses the compression attribute from the input data set for the output data set instead of the value specified on the COMPRESS= option. This interaction does not apply when using SAS/SHARE or SAS/CONNECT.
Tip:This method is highly effective for compressing medium to large (several hundred bytes or larger) blocks of binary data (numeric columns). Because the compression function operates on a single record at a time, the record length needs to be several hundred bytes or larger for effective compression.