#1 Re: Low level and performance » Unzip ODF » 2013-05-10 05:06:52

The Check() is called in UnCompressMem() (SynZip.pas line 4512).

As I just found out; unzipping empty document (newly created, no content) works, it's just the ones having content that make trouble.

#2 Low level and performance » Unzip ODF » 2013-05-08 12:16:18

hirnstroem
Replies: 2

Hi Forum,

I'd like to unzip ODF Documents created with OOo, LO or AO using TZipRead with BDS 2006. For some files - e.g. the mimetype file - in the container, unzipping works, but not for the XML files - the ones I need.

This is the code I'm using:

with TZipRead.Create(PathAndFileNameOfAnOdfDocument) do
try
  TmpStr := UnZip(NameToIndex('mimetype')); // works
  TmpStr := UnZip(NameToIndex('content.xml')); // "NameToIndex" returns an index >= 0 but "UnZip" leads to error "SynZip -2"
finally
  Free;
end;

The error occurs in "SynZip.pas" (V 1.18) in the "Check" function.

Is it possible to "fix" that? Or am I doing it wrong?

Regards
hirnstroem

Board footer

Powered by FluxBB