System Administration Guide
Chapter 2, Administering filesystems

Data compression

Data compression

The Compression Filesystem (DTFS) uses transparent data compression and a more efficient disk media format to increase the storage capacity of your disks. The compression is performed prior to the writing of file-data blocks to disk. It is designed primarily for use on systems where disk space is limited, such as personal workstations. The compression ratios are dependent on the data type. 

Table 2-3 Average disk savings

 ----------------------------------------------
 File type                  Average savings (%)
 ----------------------------------------------
 Directories                34
 Executable programs        36
 Program source files       40
 Archives and dynamically   42
 loaded libraries
 Symbolic links             50
 Binary data (bitmaps,      55
 word processing,
 databases, spreadsheets,
 and so on)
 ASCII data (log files,     60
 configuration files, and
 so on)

Standard utilities may be used to perform backup and restore operations on this filesystem.

On other filesystems, the number of disk blocks reported by ls -s does not include the amount of space consumed by the disk inode structure. With DTFS, the size of the disk inode is included in the number of blocks reported. This might make a small file appear as if it occupies more space on a DTFS filesystem when compared to other filesystems.

When displaying disk usage information, you can display:

For example, entering:

cd /usr/adm
ls -ls messages

might show:

   82 -rw-r--r--   1 bin    bin    106295 Apr 08 23:01 messages
indicating that the messages file, whose logical size is 106,295 bytes, consumes only 82 disk blocks, or a total of 41,984 bytes of disk space. This represents a 60% savings.

The du, df, and quot utilities display compressed sizes in blocks.