You are not logged in.
Pages: 1
Now I'm at a loss. I seems for some reason the initializer was not running, as the SynZip CRC table was not being populated. I was going to do a test betwen the SynZip table, and a static table to see if something was wrong when I noticed this.
I again did a clean, and a rebuild all, and now the new source is functioning. (Including the previously failing assertions.)
Undefining BYFOUR had no effect. THe only unit I am using is the current version of SynZip.
Looking at the package it's in, the compiler defines are as such:
{$ALIGN 8}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}
{$DEBUGINFO ON}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
{$IOCHECKS ON}
{$LOCALSYMBOLS ON}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION OFF}
{$OVERFLOWCHECKS ON}
{$RANGECHECKS ON}
{$REFERENCEINFO ON}
{$SAFEDIVIDE OFF}
{$STACKFRAMES ON}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
{$WRITEABLECONST OFF}
{$MINENUMSIZE 1}
{$IMAGEBASE $400000}
{$RUNONLY}
{$IMPLICITBUILD OFF}
{$DEFINE EUREKALOG}
{$DEFINE EUREKALOG_VER6}
I was going to run your unit tests, but they aren't quite right.
I ended dumbing it down to:
Assert((crc32(0,get_crc_table,5)=$DF4EC16C),'crc32');
Assert((crc32(0,get_crc_table,1024)=$6FCF9E13),'crc32');
Assert((crc32(0,get_crc_table,1024-5)=$70965738),'crc32');
And the very first assertion fails.
I'm just wondering if anyone else was having issues generating a Zip compatible archive with the SynZip unit? Using code such as
Zip := TZipWrite.Create(FileName);
try
Zip.AddDeflated(AFileName);
Zip.AddDeflated(BFileName);
Zip.AddDeflated(CFileName);
finally
FreeAndNil(Zip);
end;
results in an archive that the structure can be seen by other archivers like WinAce, but all files in the archive fail to pass verification tests and cannot be extracted. (They failed the CRC test.)
I went back in version control, and used the prior CRC calculations (via crc32.obj instead of the runtime built CRC table) which then renders correct and valid Zip archives.
Is it possible that there is a need for specific compiler directives in order for the newer optimized code to function correctly with Delphi 2010?
Pages: 1