You are not logged in.
Pages: 1
Hello,
I use the following code to create a .zip file:
class procedure TUtils.ZIP(const Dir, ZIPFile: string);
var
Z: TZipWrite;
begin
Z := TZipWrite.Create(ZIPFile);
try
Z.AddFolder(Dir);
finally
FreeAndNil(Z);
end;
end;
... and the following batch to create a test directory:
mkdir "%~1"
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File1.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File2.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File3.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File4.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File5.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File6.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File7.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File8.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File9.dat" bs=64M count=16 iflag=fullblock
"C:\msys64\usr\bin\dd.exe" if=/dev/urandom "of=%~1\File10.dat" bs=64M count=16 iflag=fullblock
7-zip shows errors while validating the created file.
Thank you
Offline
What type of errors shows 7zip?
What shows unzip with -t switch?
Offline
7-zip errors:
https://drive.google.com/file/d/1Sz0MuB … sp=sharing
Here is the output of 7z.exe (should be the same as unzip):
P:\>"C:\Program Files\7-ZIP_64_bit\7z.exe" t "C:\ProgramData\SPS\Reporting\Files\bigdir\139.zip"
7-Zip 18.01 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2018-01-28
Scanning the drive for archives:
1 file, 2150759962 bytes (2052 MiB)
Testing archive: C:\ProgramData\SPS\Reporting\Files\bigdir\139.zip
--
Path = C:\ProgramData\SPS\Reporting\Files\bigdir\139.zip
Type = zip
Physical Size = 2150759962
ERROR: Data Error : File1.dat
ERROR: Headers Error : File10.dat
ERROR: Headers Error : File2.dat
ERROR: Headers Error : File3.dat
ERROR: Data Error : File4.dat
ERROR: Headers Error : File5.dat
ERROR: Headers Error : File6.dat
ERROR: Headers Error : File7.dat
Sub items Errors: 8
Archives with Errors: 1
Sub items Errors: 8
Offline
Ah, I think it's because resulting file size is > 2Gb. In this case Zip64 format should be used (instead simple Zip format) but mORMot doesn't support it.
Offline
I make some tests and here is 4 Gb file size limitation, not 2. When mORMot needed to write more then 4 Gb data to output file, LongWord type overflow occurs and file truncated to zero.
It would be better if there was an exception with message that Zip file cannot be more than 4 Gb and Zip64 format is not supported.
Offline
Some example may be found here: Delphi System.Zip patch with ZIP64 and LZMA supports
Offline
Some time ago I asked for the implementation of zip64 in Quazip. Here are the corresponding commits: https://github.com/stachenov/quazip/sea … pe=Commits
Offline
I will go back to AbZipper in the mean time. Thank you for a great library!
Offline
Pages: 1