Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 22 Jul 2018, 05:11
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Is the maximum size for a .zip 2 Gb or 4 Gb? [SOLVED]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
musher0


Joined: 04 Jan 2009
Posts: 12423
Location: Gatineau (Qc), Canada

PostPosted: Wed 14 Mar 2018, 00:49    Post subject:  Is the maximum size for a .zip 2 Gb or 4 Gb? [SOLVED]  

Hello, all.

I'm at square one on this subject, hence the use of the newbie thread.

ATTS: On Linux, is the maximum file size for a *.zip archive 2 Gb's or 4 Gb's?

I searched the Internet and got both answers. It is not clear to me from the docs
I have read if the 2Gb limit is for older versions of zip on Linux, or if the 4 Gb limit
is for WhineDose environments only.

Context:
I've been compressing some of my Puppy construction folders to gain space on my
partitions, As you may know, building a Puppy variant through woof-CE creates
HUGE directories. I'd like to keep them as reference for a while, but in compressed
form, to reclaim space on my partitions to store other materials.

Out of caution, I have been using the following formula (as a one-liner, from
console) which splits automatically the zip at 1999 Mb's:
Code:
Z=sandbox3 # or another huge directory
zip -0mry -s 1999m -dd $Z.zip $Z/

# With parameter -m, zip moves the content of the dir. inside an
# archive of the name given. If the original dir. is empty after zip
# process is complete, it is removed

# With parameter "0" (zero), ir only stores, acting like tar. It does
# not compress anything

# -r parameter means "recurse"

# -y parameter means "keep symlinks as symlinks"

lz4 -9 $Z.zip # Lz4 does the actual compression. Used because it is
# faster than < zip -5 >, for ex., and it specializes in large files. But
# lz4 cannot compress directories. Using lz4 -9, I get compression
# rates of 45 to 55 % on those large files.

rm -f $Z.zip # cleanup

mkdir -p $Z # if original dir. has been removed, we recreate it...

mv $Z.zip.lz4 $Z # and use it to store the lz4 archive.
This is what it looks like as an uncommented one-liner:
Code:
Z=sandbox3;zip -0mry -s 1999m $Z.zip $Z/;lz4 -9 $Z.zip;rm -f $Z.zip;mkdir -p $Z;mv $Z.zip.lz4 $Z

If someone can confirm (with a good source) that the official size limit of a zip
archive is 4 Gb's, then I will do without the -s 1999m parameter, since it involves
extra complications / handling at recreation time.

Before you tell me:
I could use tar to create the initial file, but I am much more familiar with the zip
parameters. Also, I do not think confusing my brain with another set of parameters
is a good idea...

Thanks in advance.

_________________
musher0
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)

Last edited by musher0 on Wed 14 Mar 2018, 08:56; edited 1 time in total
Back to top
View user's profile Send private message 
p310don

Joined: 19 May 2009
Posts: 1211
Location: Brisbane, Australia

PostPosted: Wed 14 Mar 2018, 04:55    Post subject:  

I have read that there is a 4gig limit for zip.

I have compressed a VM of windows from approx 40gig down to about 15gig using tar.gz
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 10729
Location: Charleston S.C. USA

PostPosted: Wed 14 Mar 2018, 08:42    Post subject:  

https://en.wikipedia.org/wiki/Zip_%28file_format%29
This says it is 4GB file limit.
But this was added around the time of zip 4.5. An added "ZIP64" format extensions to get around these limitations, increasing the limitation to 16 EiB (264 bytes). In essence, it uses a "normal" central directory entry for a file, followed by an optional "zip64" directory entry, which has the larger fields.

So, I guess it depends on the version of zip you are using.

_________________
I have found, in trying to help people, that the things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 12423
Location: Gatineau (Qc), Canada

PostPosted: Wed 14 Mar 2018, 08:55    Post subject:  

Many thanks, bigpup.

The wikipedia article you suggested has this "artpol" reference:
http://www.artpol-software.com/ZipArchive/KB/0610051629.aspx#limits.
Couldn't be clearer! (Please see attached illustration.)

Again thanks.
zip-limits.jpg
 Description   
 Filesize   112.11 KB
 Viewed   44 Time(s)

zip-limits.jpg


_________________
musher0
~~~~~~~~~~
Siempre será canción nueva... (V. Jara, Manifiesto)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0376s ][ Queries: 13 (0.0041s) ][ GZIP on ]