Compressing a file
adds a fixed-length block of data to each observation. Because of
the additional block of data (12 bytes for a 32-bit host and 24 bytes
for a 64-bit host per observation), some files could result in a larger
file size. For example, files with extremely short record lengths
could result in a larger file size if compressed.
When a request is made
to compress a data set, SAS attempts to determine whether compression
will increase the size of the file. SAS examines the lengths of the
variables. If, due to the number and lengths of the variables, it
is not possible for the compressed file to be at least 12 bytes (for
a 32-bit host) or 24 bytes (for a 64-bit host) per observation smaller
than an uncompressed version, compression is disabled and a message
is written to the SAS log.
For example, here is
a simple data set for which SAS determines that it is not possible
for the compressed file to be smaller than an uncompressed one:
data one (compress=char);
length x y $2;
input x y;
datalines;
ab cd
;
The following output
is written to the SAS log:
SAS Log Output When Compression Request Is Disabled
NOTE: Compression was disabled for data set WORK.ONE because compression
overhead would increase the size of the data set.
NOTE: The data set WORK.ONE has 1 observations and 2 variables.