De-duping attachments

Shuvam Misra shuvam.misra at
Wed Sep 15 05:18:15 EDT 2010

The sparse file idea is brilliant! Never occurred to me. :)

We'd have to store the reference-pointer in the message file, so we would
omit the actual attachment but eat up perhaps 50 bytes to keep the
reference to the file.


> 1. Completely rewrite the message file removing the attachments and
> adding any extra meta data you want in it's place
> 2. Leave the message file as exactly the same size, just don't write
> out the attachment content and assume your filesystem supports
> sparse files (
> The advantage of 2 is that it leaves the message file size correct,
> and all the offsets in the file are still correct. The downsides are
> that you must ensure your FS supports sparse files well, and there's
> the question of where do you actually store the information that
> links to the external file?

More information about the Info-cyrus mailing list