[go: up one dir, main page]

Menu

#98 do not compress uncompressed files files

open
nobody
None
5
2013-06-25
2010-04-27
No

Hi,

I unzpped the .xoj file. Xournal still can open it perfectly, Sadly on pressing save it is compressed again.

I want to use xournal to take lecture notes, this might be done as group work and therefore seeing the difference in a subversion repository and conflict resolution are important.

It would be great if you could store a flag somewhere that the file was opened uncompressed and then store it uncompressed too.

thanks for your work
Felix Möller

Discussion

  • aiwarrior

    aiwarrior - 2010-05-01

    Doing that is trivial. In xo-file.c just change the gzwrite with a standard write function.
    One thing i am not sure though is if the diff will suit your needs, because you cant see directly the changes...they are just coordinates. With luck you might get some tags.
    Tell us about your experience then

     
  • Felix Möller

    Felix Möller - 2010-05-05

    I have uploaded one patch as a proof of concept.

    It does not make any sense to disable the compressed wirting functionality, But setting a flag on read if the file is compressed or not would be great.

    We then somehow need a wrapper arround the write functions.

    Sadly my C skills are too small to handle this issue.

    The diff perfectly suits my needs. I can see if mates have just done some spelling corrections or added stuff.

     
  • Anonymous

    Anonymous - 2012-10-10

    I think the idea is quite useful in the context of a version control system (svn, git) as a collaborator may add an annotation on page 1 of a PDF while another one annotates page 2. With uncompressed files, svn will automatically merge both modifications.

    The diagram editor Dia proposes a similar features: when saving a file, it is asked whether the file must be compressed or not (one checkbox).

    In the same context, it could be useful to preserve relative path for the background file: if I edit the xoj file to replace the absolute path to the background PDF by a relative one, xournal still finds it, but at the next save the xoj will be compressed and the path will become absolute again.

    Preserving the original properties of a xoj file (uncompressed and with relative path, but maybe other) is helpful when using a version control system.

     
  • Daniel Danger

    Daniel Danger - 2013-06-25

    Since I just ran into the problem today, I was currious about the current status of this feature request.
    I think having the option to use uncompressed .xoj files when using svn/git/... is essential.

    hope to see some work on this soon. And thx a lot for the great program.

     
  • Denis Auroux

    Denis Auroux - 2013-06-25

    Sorry, just no time to work on this (or much else) at the moment. Right
    now xournal is not aware of whether the file was compressed or not when
    opened -- zlib just silently treats both cases as equivalent. gzopen()
    does not provide information about what was opened. So one would need to
    add code that begins by opening the file a first time as an uncompressed
    file to probe for the gzip header, in order to figure things out; and
    the save file code would need to be modified to use either the zlib or
    regular glib file write routines, which is again a bit annoying since
    there are plenty of calls to gzprintf() and gzputs() that will need to
    be replaced by suitable wrappers.

    Denis

     

Log in to post a comment.