Dear list, Since the LyX file format is moving towards more and more attribute tags, especially in tables, and this kind of information compresses quite nicely (along with the actual text), why not make .lyx.gz a standard file format?
I propose that the file save dialogue has a checkbox for invoking gzip on the file. Also, if LyX attempts to save a .lyx for which a .lyx.gz exists, or a .lyx.gz for which a .lyx exists, it offers to remove the old file for consistency. If the two extensions are considered to be the same file, we can safely write a .lyx and call gzip on it. For reading, the open dialogue needs *.lyx.gz added to its filter. We could then pipe the file through gzip to preserve the disc copy in compressed form. Saving could either compress each time or replace the gzipped version with an uncompressed version, to be recompressed when closing lyx. Maybe. Either way, it looks like a step in the right direction. The decompressed LyX file format can be as bloated and redundant as it wants, so long as we make compressing it standard practice. Then we get the benefits of an easy-to-reverse-engineer file format for future compatibility (unlike you-know-what format), with pretty damn good usage of the disc space. I don't see a downside, so long as it remains optional. By optional, maybe the checkbox for compression is on by default but can be cleared. Any objections? Comments? Disclaimer: this post is not an offer to do any coding. Said coding must be done by authorised personnel who either have time to burn or a soft spot for helping the world be a better place. This disclaimer is not an admission that the author does not have a soft spot for anything. =) Have fun, Darren
