On 6/4/07, Mathias Bauer <[EMAIL PROTECTED]> wrote:
> Is it possible to construct a zip file from the extracted contents of
> an ods or odt file that is identical to the original ods/odt file? I
> would like to be able to do something like the following:
>
> $ unzip doc.odt -d doc
> $ cd doc
> $ zip [options] ../doc2.zip *
> $ diff ../doc.odt ../doc2.zip && echo match
> match
>
> I tried the following with [options] being -9Xr, but the resulting zip
> file was 7163 bytes and the original odt was 6741 bytes.
Can you explain why it should be important that the files are completely
identical?
If using OOo with an SCM that decompresses the OOo files and stores
the plain-text contents, the SCM must reconstruct the compressed OOo
file exactly because an SCM is supposed to always return to the user
the same data that they checked in.
For example, the following should work:
$ svn commit test.odt
$ mv test.odt test1.odt
$ svn up
[pulls deleted test.odt from repository]
$ diff test.odt test1.odt && echo match
match
An SCM user might, for example, keep checksums of all the files they
commit to verify that no one tampered with their files while the files
were hosted on the SCM system. If the checksum doesn't match and the
SCM did not always return an identical binary for a given file and
revision, then the user wouldn't know whether their file had been
tampered with or if the SCM had just decided to modify it but it still
"meant" the same thing.
Denver
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]