Re: undelete?

Miquel van Smoorenburg (
26 Jul 1997 12:20:25 +0200

In article <>,
Darin Johnson <> wrote:
> > Compression should be left to user space apps, which can be written
> > to deal with the problem in a more sane manner.
>Except then that every app needs to understand compressed files, and
>currently, they don't. I can't do a "grep string HOWTO/*" currently,
>and as soon as I write a script to do that, I'll run into another
>command that does't understand compressed files.
>Yes, some things in the kernel will be difficult to do on compressed
>files. For mmap(), etc, it would be ok to just completely decompress
>the file first, but this involves communication between the fs and
>the kernel. For seek(), gack. Perhaps just have the calls fail.
>Howz NT do this?

I've though about this a couple of times, and I think it's not that
hard. You just divide each file into chunks of (say) 4Kb. You then
compress that 4Kb block. If it becomes 1Kb, great, you put it in the
first block of 4, and the other 3 blocks are empty. Since empty
blocks do not take up disk space (holes), that's no problem.

So you don't compress the file as a whole, you compress it on a 4Kb or
8Kb block basis.

That way, seeking into a file is still easy.


| Miquel van Smoorenburg |                                                    |
|     |   RAM DISK is NOT an installation procedure!!!     |
|     PGP fingerprint: FE 66 52 4F CD 59 A5 36  7F 39 8B 20 F1 D6 74 02       |