Subject: Storing folders as gzipped.

From: [email-masked] (Kevin Kadow)
Date: 25 Oct 1995 18:04:50 GMT

This modification will require less hacking than you might think- gzip will
handle multiple gzip'd files concatenate together.

In article <[email-masked]>,
Sven Guckes  <[email-masked]> wrote:
>[email-masked] (Marco van den Boogaard) writes:
>>I was wondering if anybody has written a version of elm which supports
>>gzipped folders to save diskspace on systems with quota.
>
>This has been a top wish for ELM.
>See http://www.math.fu-berlin.de/~guckes/elm/elm.development.html .
>
>>I'm willing to hack elm myself, but only if it hasn't been done already,
>>I don't want to invent the wheel for the 687th time.
>
>I have not heard about anyone who has tried to do it.
>But you are VERY welcome to do so!
>Send you patches to the ELM coordinator and then maybe it will be included
>with the next release.
>
>Things to take care of:
>User feedback:
>	Ask user whether a folder with suffix ".gz" shall (always) be expanded.
>Disk space:
>	Check whether the expanded folder will fit on the disk.
>	Optionally expand the folder to a temporary space.
>File locking:
>	Make sure that it is compatible with the lock method.
>	Check for existance and version of gzip.
>Saving:
>	Check whether folder being saved to is compressed and uncompress if
>	necessary.
>Utils:
>	Adjust ELM utilities such as "frm" to work on compressed folders.
>	Disallow appending of mail to compressed folders for "filter".
>
>Did I forget anything?

This is not necessary. Simply specify gzip as the standard and link the
modified ELM against the gzip library. Then the files can be uncompressed into
memory, and saved messages (or the output of filter) can be simply concatenated
to the end of existing folders, as documented by the gunzip man page:

>ADVANCED USAGE
>     Multiple compressed files can be concatenated. In this case,
>     gunzip will extract all members at once. For example:
>
>           gzip -c file1  > foo.gz
>           gzip -c file2 >> foo.gz
>
>     Then
>           gunzip -c foo
>
>     is equivalent to
>
>           cat file1 file2
>
>     In case of damage to one member of a .gz file, other members
>     can  still  be recovered (if the damaged member is removed).
>     However, you can get better compression by  compressing  all
>     members at once.

This means that the uncompressed form of the folder need never be stored
on the drive, and that appending messages to a folder will NOT require
recompressing the entire folder, unless you want optimal compression.

Some rudimentary folder locking will be necessary to prevent having one
or two messages corrupted if(when) two processes attempt to write to the
same file.

---

From: Sven Guckes <[email-masked]>
Date: 30 Oct 95 15:35:21 GMT

[email-masked] (Kevin Kadow) writes:
>[...] Then the files can be uncompressed into memory, [...]

Oh, this is soooo great!  No problem then to keep 4MB+ folders in memory.
Please send me some money so I can buy some RAM to keep my 20MB mail log in
the memory.  Yes, I'd have to uncompress most of them before I can use them.

>Some rudimentary folder locking will be necessary to prevent having one or two
>messages corrupted if(when) two processes attempt to write to the same file.

"rudimentary", eh?  So - which one do you suggest?

Sven  [here we go again...]

Cc: [email-masked] (Kevin Kadow)
--
http://www.math.fu-berlin.de/~guckes/.signature