[GSOC] Introduction to HAMMER2 compression feature

Alokat MacMoneysack mailing at alokat.org
Wed Jun 12 09:38:20 PDT 2013

Im looking forward to use this feature.
What about a compression like gzip e.g. for log file compression or LZJB?

Will you make it possible to let the user choose the compression algorithm or do you just looking for the "best" one?

Daniel Flores <daniel5555 at gmail.com> wrote:

>Hello everyone,
>My name is Daniel Flores and my proposal called “HAMMER2 compression
>feature” was accepted for this year’s Google Summer of Code. I already
>posted the draft of my proposal [1] in this kernel list, so I will not
>repeat much of it, but instead I want to focus on some design decisions
>that I’ve already made. Since I’m an inexperienced developer at this
>I’d be happy to receive your suggestions and criticism.
>The feature itself consists in that it attempts to compress a HAMMER2
>block, which is of 64KB in size. The result should be a block of 32KB,
>16KB, 8KB, etc. in size.
>Currently I’m searching for the algorithms that are the most
>for a file system. Particularly I’m searching for algorithms that are
>fast; don’t require a lot of memory and processing power and offer
>good compression rate (but not necessarily the best compression rate
>out of
>all). Right now I have two candidates – DEFLATE [2] and LZO [3]. Both
>them have some available implementations which I intend to use, as Alex
>suggested in his review of my proposal.
>DEFLATE seems to be a good choice, because it works with small amounts
>data and has a sliding window of 32KB – just nice for a 64KB block. It
>based on another algorithm – LZ77, which is successfully used in
>compression feature for NTFS, so hopefully DEFLATE would be good as
>LZO seems to be a good choice, because, similarly, it works on small
>amounts of data, it is as fast as DEFLATE and was specifically designed
>have a very fast decompression speed.
>My initial proposal only covers the implementation of one algorithm,
>but if
>the time allows, I would try to add both of them and maybe add some
>The design will be modular, so it will not be difficult to change the
>My initial strategy, as I already mentioned in my proposal, is to
>first, a prototype application to test those algorithms. The
>would take a file, break it in 64KB blocks, compress them one by one,
>then decompress them. After that the resulting uncompressed blocks
>would be
>compared with the original blocks and if they are identical, then it
>mean that the algorithm works correctly.
>I will try to compare the algorithms in terms of efficiency and speed,
>choose the best one. I also expect that I’ll have to modify a bit the
>implementations, because most likely they won’t produce a block of an
>size as required, so I would have to add some padding to it.
>After the exhaustive testing with the prototype application, I will add
>compression feature in HAMMER2 itself and do real-life testing. The
>to set up the compression feature would also be done at this point. By
>end of summer, the compression feature should be fully and correctly
>implemented and ready for use.
>[1] –
>[2] – http://en.wikipedia.org/wiki/DEFLATE
>[3] – http://en.wikipedia.org/wiki/LZO

Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20130612/c724cbc4/attachment-0002.htm>

More information about the Kernel mailing list