Why ! : Ogre & 7Zip

What it says on the tin: a place to discuss proposed new features.
Post Reply
User avatar
n9ine
Halfling
Posts: 55
Joined: Mon Aug 25, 2008 4:24 pm

Why ! : Ogre & 7Zip

Post by n9ine » Mon Feb 08, 2010 3:42 pm

Hi all;

Why not use 7zip as zipArchive since zip is an old format?
Zlib is a dead project and since 2005 this project is no more maintained and lot of bugs were found.

Hope interested people give there point of view about this and give hints to how this can be done.
0 x

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2702
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 3

Re: Why ! : Ogre & 7Zip

Post by syedhs » Mon Feb 08, 2010 8:42 pm

Well the issue has already been raised here.

If you read the thread, it basically boils down to having self-extracting 7zip done automatically in linux - I wonder how it is done?
0 x
A willow deeply scarred, somebody's broken heart
And a washed-out dream
They follow the pattern of the wind, ya' see
Cause they got no place to be
That's why I'm starting with me

nbeato
Gnome
Posts: 372
Joined: Thu Dec 20, 2007 1:00 am
Location: Florida
x 1
Contact:

Re: Why ! : Ogre & 7Zip

Post by nbeato » Tue Feb 09, 2010 12:32 am

Maybe I missed something, but that thread is talking about downloading the OGRE library. I think the question was regarding archive support importing (Zip=blah.zip in a resource config).

Edit: I can't really, tell I think he's actually asking why resource configs don't import 7z files instead of older zip files... but there's no reason that can't be added without destroying the current zip loader. My interpretation is: why not use 7zip as the zip decompress lib since zlib is not maintained anymore. ah screw it, OP needs to clarify.
0 x

User avatar
MrD
Goblin
Posts: 292
Joined: Wed Oct 21, 2009 3:16 pm
Location: England

Re: Why ! : Ogre & 7Zip

Post by MrD » Tue Feb 09, 2010 1:11 am

I interpreted it as using 7zip to handle both zip files and also add support for the 7zip format. Now the addition of the 7zip format would be nice since the compression is better than zip, and the LZMA SDK is freely available; but (and I haven't checked this) I don't think the LZMA SDK can replace zlib for handling zip files since I think it just handles the 7z format.

I see no logical reason why 7zip support can't be added without having to remove zip support, it could just be added as another archive type.
0 x
Insimnax Framework - A game framework for OGRE

User avatar
vitefalcon
Orc
Posts: 438
Joined: Tue Sep 18, 2007 5:28 pm
Location: Seattle, USA

Re: Why ! : Ogre & 7Zip

Post by vitefalcon » Tue Feb 09, 2010 1:43 pm

7-zip SDK is a bit confusing to start with I guess. I've tried to make a 7zip archive plugin just like Zip. But in the end I had to drop it because other works took priority. But while working on the 7-zip archive plugin, I was wondering, if someone needed the archive to be password-protected, Ogre cannot deal with it (afaik). I even thought of editing the format like

Code: Select all

7zip=location[encoded-password/hint]
The user can then make a listener to the archive reader which should provide the password based on the encoded-password/hint when prompted by the archive reader. There must be a better way but that was my naive way of getting password protected archive files to be opened.
Once I'm off my current rework of our framework I can have a look at reviving this.
0 x
Image

User avatar
n9ine
Halfling
Posts: 55
Joined: Mon Aug 25, 2008 4:24 pm

Re: Why ! : Ogre & 7Zip

Post by n9ine » Tue Feb 09, 2010 2:53 pm

Thanks vitefalcon
vitefalcon wrote:I can have a look at reviving this.
And if you want i can be helpful doing this.
:wink:
0 x

User avatar
MrD
Goblin
Posts: 292
Joined: Wed Oct 21, 2009 3:16 pm
Location: England

Re: Why ! : Ogre & 7Zip

Post by MrD » Tue Feb 09, 2010 2:57 pm

Password protection is a whole other can of worms, and imho should be dealt with as a separate issue to this thread considering that normal zip archives can also be password protected so it would seem to be a more general archive manager kind of thing.
0 x
Insimnax Framework - A game framework for OGRE

User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7152
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 19

Re: Why ! : Ogre & 7Zip

Post by Kojack » Wed Feb 10, 2010 12:22 pm

One day I want to play around with PhysicsFS (it has nothing to do with physics). It's a virtual file system which handles zip and 7zip files. You can mount multiple directories, zips and other stuff (it handles doom wad files, quake pak files, etc) into a virtual directory structure, with per file replacement so you can have patch files or modified files outside of a zip which override the usual game data. You can also specify a write directory and physicsfs will block writes (when using it's functions of course) to any other directory, good for allowing scripting languages to do free io, but protecting the user's system.

I've never used it though, so maybe it's not as good as it sounds.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Why ! : Ogre & 7Zip

Post by jacmoe » Wed Feb 10, 2010 12:33 pm

It's rather nice! :)
Been around for ages - for good reason.

7Zip is good, but it's not as fast as regular zip.
And still not as fast as FastLz:
http://www.fastlz.org/index.html
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
MrD
Goblin
Posts: 292
Joined: Wed Oct 21, 2009 3:16 pm
Location: England

Re: Why ! : Ogre & 7Zip

Post by MrD » Wed Feb 10, 2010 1:31 pm

Kojack wrote:One day I want to play around with PhysicsFS
Looks interesting.
0 x
Insimnax Framework - A game framework for OGRE

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: Why ! : Ogre & 7Zip

Post by CABAListic » Wed Feb 10, 2010 1:36 pm

PhysicsFS is very nice. I have a working C++ wrapper and Ogre integration (read-only currently) for it, it's relatively easy to do.
0 x

User avatar
n9ine
Halfling
Posts: 55
Joined: Mon Aug 25, 2008 4:24 pm

Re: Why ! : Ogre & 7Zip

Post by n9ine » Wed Feb 10, 2010 2:35 pm

CABAListic wrote:PhysicsFS is very nice. I have a working C++ wrapper and Ogre integration (read-only currently) for it, it's relatively easy to do.
would you please share your wrapper.It is interesting as an ogreaddons , is 'nt it?.
0 x

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: Why ! : Ogre & 7Zip

Post by CABAListic » Wed Feb 10, 2010 3:09 pm

It consists merely of two files. I actually posted an earlier version here: https://www.ogre3d.org/forums/viewtopic.php?f=5&t=35254
Although, if I remember correctly, that version contained a tiny error somewhere. Anyway, I can upload the current version when I get home. It is slightly more integrated with our game engine, though, and it uses POCO, so you may not be able to use it directly.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Why ! : Ogre & 7Zip

Post by jacmoe » Wed Feb 10, 2010 3:18 pm

That sounds interesting! :)
After all my talk about POCO, I admit that I haven't started using it yet. :P
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: Why ! : Ogre & 7Zip

Post by CABAListic » Wed Feb 10, 2010 4:00 pm

Well, we eventually switched from Boost to POCO, but mostly because of POCO's zip handling functions. I want to use zip archives for certain game data, and I need both read and write support. I didn't find any other convincing library for the purpose, so I stuck with POCO, and since POCO and Boost often obtain similar purposes, we dropped boost as a dependency.

Anyway, here is the current version: http://downloads.oddbeat.de/physfs_cpp.zip
As I said, it is more integrated with our engine, so to actually use it, you'll have to make some modifications. Or just use the first version, which is independent. The bug I mentioned was, iirc, in the functions enumerateFiles / getDirListing / getFileListing, just compare them with the current version.
0 x

User avatar
n9ine
Halfling
Posts: 55
Joined: Mon Aug 25, 2008 4:24 pm

Re: Why ! : Ogre & 7Zip

Post by n9ine » Fri Feb 12, 2010 4:57 pm

physicsfs is cool but it can not be a replacement for zip.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Why ! : Ogre & 7Zip

Post by jacmoe » Fri Feb 12, 2010 5:19 pm

There's absolutely no reason to change it. :)
It's really easy to code and register your own archive types in Ogre.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
n9ine
Halfling
Posts: 55
Joined: Mon Aug 25, 2008 4:24 pm

Re: Why ! : Ogre & 7Zip

Post by n9ine » Fri Feb 12, 2010 5:31 pm

I have a bug with zlib and nobody can fix this since zlib is dead.
Why not switch to 7Zip ?
http://www.ogre3d.org/forums/viewtopic.php?f=5&t=55541
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Why ! : Ogre & 7Zip

Post by jacmoe » Fri Feb 12, 2010 5:39 pm

Implement your own archive, and your problem is solved.
2500 zip files?
Insane.

It's really easy to create a 7zip archive yourself, so why not do that?
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
Contact:

Re: Why ! : Ogre & 7Zip

Post by CABAListic » Fri Feb 12, 2010 5:39 pm

As jacmoe said, if you want to use 7zip, then just build your own Archive plugin, it's really not that hard (provided you find a good library to handle 7z archives). As a core feature of Ogre, I'm rather sceptical. zip is a lot more common than 7z, so dropping support of zip in favour of 7z is imho not a smart move right now.
0 x

User avatar
n9ine
Halfling
Posts: 55
Joined: Mon Aug 25, 2008 4:24 pm

Re: Why ! : Ogre & 7Zip

Post by n9ine » Fri Feb 12, 2010 5:41 pm

jacmoe wrote:It's really easy to create a 7zip archive yourself, so why not do that?
Yah i will do that. :D
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Why ! : Ogre & 7Zip

Post by jacmoe » Fri Feb 12, 2010 5:44 pm

It works. It's used internally. It's only one possible type of archive.
Ogre is designed that way: pluggable.
You can implement your own archive types / managers, your own scene managers, etc.
It wouldn't be Ogre otherwise. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Why ! : Ogre & 7Zip

Post by jacmoe » Fri Feb 12, 2010 5:45 pm

n9ine wrote:
jacmoe wrote:It's really easy to create a 7zip archive yourself, so why not do that?
Yah i will do that. :D
If you need help, shout. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

Post Reply