Artificial intelligent assistant

How does SquashFS handle decompression? How does SquashFS handle decompression? I'm interested in the overhead that LZ4 has on the SquashFS filesystem. My theory is that the files in the SquashFS filesystem gets uncompressed during read. What about directory listing?

SquashFS is documented in some detail in the kernel documentation. All the contents of a SquashFS file system can be compressed, including inodes and directory entries; inodes and directory entries are also laid out specifically to improve compression.

This means that any data or metadata read from the file system involves decompression; however, the overhead is reduced somewhat using caches:

* file data is decompressed to the page cache, so multiple reads in the same page don’t require decompressing the data multiple times;
* metadata and fragments (tail-end packed blocks) are decompressed to small, specific metadata and fragment caches, so multiple reads of the same metadata blocks ( _e.g._ when listing a directory’s contents) don’t require decompressing the same blocks multiple times.



There are also various lookup tables to speed up operations involving various indexes (blocks, user and group identifiers, and fragments).

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8c0931e3c6e8ca3d38764b9ac707dcb9