@ayo Nice article!
I like how little RAM your code uses.
As for the improvements - do you think an LRU of blocks would make significant improvement? I'd think that all the blocks that'd end up in the LRU already end up in kernel's page cache. So your own cache would be mostly to avoid syscalls? Or am I missing something?
The LRU cache would cache *uncompressed* blocks, so it would skip the decompression step. You're right that the savings in terms of syscalls or I/O probably wouldn't be very significant.
@ayo oh, yeah, I forgot about the compression. Makes a lot of sense.
Welcome to your niu world ! We are a cute and loving international community Ｏ(≧▽≦)Ｏ !