Block compression feature in HAMMER2
by iostream for DragonFly BSD
This project aims to add block compression feature to HAMMER2. It consists of 2 parts: first, implementing an algorithm capable of compressing a physical block to 50% or less of its original size (in powers of 2, like 32 KB, 16 KB; the original size being 64 KB) and, second, adding a hammer2 utility command to set the compression mode on any directory, which will try to compress any written content in that directory and its subdirectories using the implemented algorithm. If the algorithm can’t compress a particular block to 50% or less of its original size, the block is written uncompressed.