Go to the first, previous, next, last section, table of contents.


Size shown for compressed files

When an application calls stat to fetch the attributes of a file (such as its permissions, size, type, etc.), zlibc stats the corresponding compressed file instead. After doing so, zlibc has to adjust some of the values returned by stat, such as the type and the size. The type has to be adjusted for those files that should be shown as pipes. The size has to be adjusted because user programs are usually interested in the amount of data that they can actually read from the file (i.e. the size of the uncompressed file) rather than the size of the physical file (i.e. the size of the compressed file). However, in order to find out the size of the uncompressed file, zlibc has to read some data of the file, which may impact performance in situations where many files are stat'ed. This is for instance the case for find, or for ls on an ftpfs filesystem. The following two behaviors of the stat call may be specified:

show-compressed-size
Stat returns the size of the compressed file. This is less useful for the application, but more efficient. If you mount any ftpfs filesystems, you may switch on show-compressed-size just for that filesystem by using the filesystem criterion (see section File selection Criteria).
show-uncompressed-size
Stat returns the size of the uncompressed file. This is more useful for the application, but less efficient. This is the default behavior.


Go to the first, previous, next, last section, table of contents.