COMPRESSED, UNCOMPRESSED, and ZCOMPRESSED Subcommands (SAVE command)

COMPRESSED and ZCOMPRESSED save the file in compressed form. UNCOMPRESSED saves the file in uncompressed form.

  • The only specification is the keyword COMPRESSED, UNCOMPRESSED, or ZCOMPRESSED.
  • In a file compressed with COMPRESSED, small integers (from −99 to 155) are stored in one byte instead of the eight bytes that are used in an uncompressed file.
  • In a file compressed with ZCOMPRESSED, case data (regardless of type) are compressed block by block with a high compression ratio. Only IBM® SPSS® Statistics version 21 or later can open a file compressed with ZCOMPRESSED. Therefore, it is recommended that you use the .zsav file extension when saving files with ZCOMPRESSED. Older versions of IBM SPSS Statistics will ignore this extension.
  • Compressed data files occupy less disk space than uncompressed data files. Files compressed with ZCOMPRESSED occupy the least disk space.
  • Compressed files may take more or less time to open and save, depending on the file size and system configuration. Extra time is needed to de-compress and compress the files. However, because compressed files are smaller on disk, they reduce the time needed to read and write from disk. As the file size gets larger, this time savings surpasses the extra time needed to de-compress and compress the files. This is especially true for files compressed with ZCOMPRESSED, because these files are smallest on disk.
  • The GET command, which reads IBM SPSS Statistics data files, does not need to specify whether the files that it reads are compressed or uncompressed.
  • Only one of the subcommands COMPRESSED, UNCOMPRESSED, or ZCOMPRESSED can be specified per SAVE command. COMPRESSED is the default.