Cramfs


The compressed ROM/RAM file system is a free read-only Linux file system designed for simplicity and space-efficiency. It is mainly used in embedded and small-footprint systems.
Unlike a compressed image of a conventional file system, a cramfs image can be used as it is, i.e. without first decompressing it. For this reason, some Linux distributions use cramfs for initrd images and installation images, where there are constraints on memory and image size.
In 2013, Linux maintainers indicated that cramfs was made obsolete by squashfs, but the file system got rehabilitated in 2017 for use in low-memory devices where using squashfs may not be viable.

Design

Files on cramfs file systems are zlib-compressed one page at a time to allow random read access. The metadata is not compressed, but is expressed in a terse representation that is more space-efficient than conventional file systems.
The file system is intentionally read-only to simplify its design; random write access for compressed files is difficult to implement. cramfs ships with a utility to pack files into new cramfs images.
File sizes are limited to less than 16MB.
Maximum file system size is a little under 272MB.