7z vs Zip (Love launcher Compression Method)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
ZacharySciApps
Prole
Posts: 5
Joined: Sat Nov 12, 2011 4:23 pm

7z vs Zip (Love launcher Compression Method)

Post by ZacharySciApps »

Zip just slightly compresses files but 7z can save up to half the amount of memory you would use for a zip file for example one of the demos took 22kbs I extracted it and compressed it it with 7Zip and now its 14kbs! imagine if a game was 22mbs and you compressed it with 7Zip and it was only 11mbs making it much much more portable! Start using 7Zip! :x
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: 7z vs Zip (Love launcher Compression Method)

Post by Taehl »

7zip can make .zip files pretty small too. Just select "Ultra" level compression. (I'd suggest against changing it to LZMA, though)

In the forums, we use .zip loves as a matter of courtesy and uniformity. Though I agree, I can't see why anyone would want to use WinRar or whatever instead of 7zip.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
ZacharySciApps
Prole
Posts: 5
Joined: Sat Nov 12, 2011 4:23 pm

Re: 7z vs Zip (Love launcher Compression Method)

Post by ZacharySciApps »

I respect that also the compression could impair the game but I recommend using 7Zip if size is a concern and I just tried your method and 7z is still incredibly lighter :) zip is a standard format as well most company's use like Microsoft, gadgets are normally compressed into a zip format. :)
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: 7z vs Zip (Love launcher Compression Method)

Post by thelinx »

As far as I know, PhysFs (the library LÖVE uses to read zip files) can infact open LZMA .love files on some platforms.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 7z vs Zip (Love launcher Compression Method)

Post by Robin »

And .love files usually aren't that large anyway, so it's better to play safe and use zip compression.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: 7z vs Zip (Love launcher Compression Method)

Post by bartbes »

More importantly, them opening is an implementation detail rather than a specification, really. So don't count on this to work everywhere indefinitely.
User avatar
slime
Solid Snayke
Posts: 3131
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: 7z vs Zip (Love launcher Compression Method)

Post by slime »

ZacharySciApps wrote:imagine if a game was 22mbs and you compressed it with 7Zip and it was only 11mbs making it much much more portable! Start using 7Zip! :x
22MB is 0.000021 terabytes, 11MB is 0.0000105 terabytes. HD space will only go up, and terabyte drives are very common these days. Getting a little bit of extra space by using a compression method that is not universally supported isn't always a good idea.
Also, much of the space taken up by games is used by already-compressed media and images - ogg sounds, png images, etc. Using 7zip on those won't have as much of an impact as you might think.
User avatar
Taehl
Dreaming in associative arrays
Posts: 1025
Joined: Mon Jan 11, 2010 5:07 am
Location: CA, USA
Contact:

Re: 7z vs Zip (Love launcher Compression Method)

Post by Taehl »

slime wrote:Also, much of the space taken up by games is used by already-compressed media and images - ogg sounds, png images, etc. Using 7zip on those won't have as much of an impact as you might think.
That's a very good point, come to think of it.
Earliest Love2D supporter who can't Love anymore. Let me disable pixel shaders if I don't use them, dammit!
Lenovo Thinkpad X60 Tablet, built like a tank. But not fancy enough for Love2D 0.10.0+.
User avatar
tentus
Inner party member
Posts: 1060
Joined: Sun Oct 31, 2010 7:56 pm
Location: Appalachia
Contact:

Re: 7z vs Zip (Love launcher Compression Method)

Post by tentus »

slime wrote: Also, much of the space taken up by games is used by already-compressed media and images - ogg sounds, png images, etc. Using 7zip on those won't have as much of an impact as you might think.
This. There's a clear hierarchy of file size in most video games, and a perfectly inverse hierarchy of compression for each of them, because the larger the file type, the more effort was put into making them as efficient as possible. There's very little left you can do to make an ogg file smaller, while there's a lot you can do to make text files smaller.

A 22 kb .love will contain code, maybe some map files, and probably a few textures. Most of that is highly compressible. On the other hand, a 22 mb .love will probably contain several tracks of music, lots of textures, and a comparatively small amount of code, map files, etc. I'd be surprised if switching compression formats gives you even 1% reduction in final size.
Kurosuke needs beta testers
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 7z vs Zip (Love launcher Compression Method)

Post by Robin »

tentus wrote:I'd be surprised if switching compression formats gives you even 1% reduction in final size.
That's a bit overstated. Each megafile might be optimally compressed, but when you .zip a lot of files, there's bound to be some sort of repetition across files compression formats can take advantage of, like tar.gz files. (Come to think of it, I don't think ZIP actually does that, but it could.)
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 47 guests