Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: need to compress large files with TZip


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 13 - Last Post: Jul 4, 2017 5:25 AM Last Post By: Allan Fernandes
Allan Fernandes

Posts: 76
Registered: 9/30/00
need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 26, 2017 2:22 AM
I am trying the TZip method in Seattle to compress a 20 GB file.
Using the zcDeflate the large file do not work, whereas smaller files work.
All the other compression methods do not work at all for any file.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 26, 2017 12:36 PM   in response to: Allan Fernandes in response to: Allan Fernandes
Allan Fernandes wrote:

I am trying the TZip method in Seattle

Do you mean the TZipFile class?

http://docwiki.embarcadero.com/Libraries/en/System.Zip.TZipFile

to compress a 20 GB file.

If you mean Delphi's TZipFile class, that that will not work at all,
because TZipFile does not implement the ZIP64 extensions needed to
handle files larger than 4 GB:

TZipFile , Zip64 support needed
https://quality.embarcadero.com/browse/RSP-14774

System.Zip doesn't work properly with files larger in size than 4 GB
https://quality.embarcadero.com/browse/RSP-15587

For that matter, TZipFile is just plain buggy in general (there are
TONS of bug reports in QP). My advice - don't use TZipFile at all.
There are plenty of 3rd party ZIP libraries/components that work in
Delphi.

--
Remy Lebeau (TeamB)
Allan Fernandes

Posts: 76
Registered: 9/30/00
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 26, 2017 10:27 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
There are plenty of 3rd party ZIP libraries/components that work in Delphi.

I have been using Zipmaster successfully for several years. Now I am revamping my application and wanted Stronger Encryption and Long file name handling which is not available in Zipmaster.

I looked at 7Zip thru Delphi but there is no code to prepare Deflate64 zips. the others are too slow.
https://sourceforge.net/p/sevenzip/discussion/45797/thread/297aadb7/

Xceed is way too expensive

Zipforge does not have long file name handling.

Synopse (SynLz) is super fast but the compression is inadequate.

Can you suggest any others that I can check.

Regards
Allan
Angus Robertson

Posts: 205
Registered: 3/17/00
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 27, 2017 12:37 AM   in response to: Allan Fernandes in response to: Allan Fernandes
There are plenty of 3rd party ZIP libraries/components that
work in Delphi.
Can you suggest any others that I can check.

I would have suggested VLCZip which I've been using for 15 years, but
the original developer seems to have disappeared and it seems you can
now only buy stolen cracked versions.

A pity it was not made open source if he wanted to abandon it.

Angus
Mark Marks

Posts: 269
Registered: 9/11/00
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 27, 2017 7:01 AM   in response to: Allan Fernandes in response to: Allan Fernandes
Allan Fernandes wrote:

Can you suggest any others that I can check.

Abbrevia
ZipMaster
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2017 1:45 PM   in response to: Allan Fernandes in response to: Allan Fernandes
Allan Fernandes wrote:

Zipforge does not have long file name handling.

Are you sure? I have been using ZipForge for years, never had a
problem with LFNs, either in the files added to a zip, or the name of
the zip itself.

--
Remy Lebeau (TeamB)
Yannick LANCHEC

Posts: 43
Registered: 1/21/01
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2017 2:32 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Allan Fernandes wrote:

Zipforge does not have long file name handling.

Are you sure? I have been using ZipForge for years, never had a
problem with LFNs, either in the files added to a zip, or the name of
the zip itself.

--
Remy Lebeau (TeamB)

In the source code of zipforge, there is : (line 6674)

" begin
if ((DMHandle.CDir.Items[ItemNo].CentralDir.externalAttr and
faDirectory) = 0) then
begin
if (Length(DMHandle.CDir.Items[ItemNo].SrcFileName) < MAX_PATH) Or (Pos('\\?\', DMHandle.CDir.Items[ItemNo].SrcFileName) > 0) then
begin
"

There is longname support : \\?\

Best regards

Yannick
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2017 3:41 PM   in response to: Yannick LANCHEC in response to: Yannick LANCHEC
Yannick LANCHEC wrote:

Pos('\\?\', DMHandle.CDir.Items[ItemNo].SrcFileName) >
0

They should have used StartsText() instead of Pos(), or at least
checked if Pos() returns exactly 1 instead of > 0.

--
Remy Lebeau (TeamB)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2017 3:49 PM   in response to: Yannick LANCHEC in response to: Yannick LANCHEC
Yannick LANCHEC wrote:

Remy Lebeau (TeamB) wrote:
Allan Fernandes wrote:

Zipforge does not have long file name handling.

Are you sure? I have been using ZipForge for years, never had a
problem with LFNs, either in the files added to a zip, or the name
of the zip itself.

--
Remy Lebeau (TeamB)

In the source code of zipforge, there is : (line 6674)

" begin
if ((DMHandle.CDir.Items[ItemNo].CentralDir.externalAttr and
faDirectory) = 0) then
begin
if (Length(DMHandle.CDir.Items[ItemNo].SrcFileName) MAX_PATH) Or (Pos('\\?\', DMHandle.CDir.Items[ItemNo].SrcFileName) >
0) then begin "


Then you used the wrong terms:

Long file names are names that are longer than 8.3 names, and these are
restricted to MAX_PATH. A long file name is something like
"namespacelibetonyek_1_1PAGToken.html"

You mean UNC path names:

https://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention


--
Rudy Velthuis http://www.rvelthuis.de

"When women are depressed they either eat or go shopping. Men
invade another country."
-- Elayne Boosler

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2017 4:06 PM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Rudy Velthuis (TeamB) wrote:

Then you used the wrong terms:

Long file names are names that are longer than 8.3 names, and these
are restricted to MAX_PATH. A long file name is something like
"namespacelibetonyek_1_1PAGToken.html"

You mean UNC path names:

https://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention

'\\?\' is not itself a UNC prefix. It is a special prefix used by the
filesystem drivers to remove the MAX_PATH limitation. For UNC paths,
use the '\\?\UNC\' prefix.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath

--
Remy Lebeau (TeamB)
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jun 28, 2017 4:13 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:

Rudy Velthuis (TeamB) wrote:

Then you used the wrong terms:

Long file names are names that are longer than 8.3 names, and these
are restricted to MAX_PATH. A long file name is something like
"namespacelibetonyek_1_1PAGToken.html"

You mean UNC path names:

https://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention

'\\?\' is not itself a UNC prefix. It is a special prefix used by the
filesystem drivers to remove the MAX_PATH limitation. For UNC paths,
use the '\\?\UNC\' prefix.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath

Ah yes, a so called extended-length path. Indeed, sorry.

But still, long file names are accepted.

--
Rudy Velthuis http://www.rvelthuis.de

"Do illiterate people get the full effect of alphabet soup?"
-- John Mendoza
Allan Fernandes

Posts: 76
Registered: 9/30/00
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 3, 2017 5:14 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
I have been in touch with Zipmaster's Mr.Peters, he has been extremely helpful over the years. As far as Long File names and Encryption he has said.
The next version (2.0) will have better support for long file names and no dll.
After that I make a start on better encryption.

By Long File Name I mean names that are above approx 255 characters (255 that's including indented folders and filename).

Tried Abbrevia but it is very slow.
Rudy Velthuis (...


Posts: 7,731
Registered: 9/22/99
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 3, 2017 5:33 AM   in response to: Allan Fernandes in response to: Allan Fernandes
Allan Fernandes wrote:

By Long File Name I mean names that are above approx 255 characters
(255 that's including indented folders and filename).

Then you are using the wrong terminology:

Long file names are names that are longer than 8.3 filenames (but up to
MAX_PATH).

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#short_vs._long_names

You mean extended-length path names, starting with '\\?\'.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath
--
Rudy Velthuis http://www.rvelthuis.de

"I hate you, I despise you, I loathe you. Everything about you
DISGUSTS me. Your ears, eyes, nose, mouth, tongue, legs, knees,
stomach, ribs and bottom make me want to vomit up. You're
repulsive, loathsome, grotesque and insupportable. I want to
kill you, I want to twist your nipples off and throw them to the
dogs. You low corrosive lump of faecal horror; you maniac
bastardly turd; I would rather drink stale urine from Norman
Fowler's arse-pit than remain one moment longer in your
defiling company; you're filth, you're cack, you're the ooze of
a burst boil; I abominate you, you towering mound of corrupted
slime; your every utterance is like the slithering hiss of a fat
maggot in the guts of a decomposing rat; your face is fowler
than the unwiped ring of Satan's rectum."
-- Stephen Fry, A Bit of Fry and Laurie
Allan Fernandes

Posts: 76
Registered: 9/30/00
Re: need to compress large files with TZip  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 4, 2017 5:25 AM   in response to: Rudy Velthuis (... in response to: Rudy Velthuis (...
Yes I mean 'extended-length path names'
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02