Archive file support

Started by
2 comments, last by nife87 16 years, 8 months ago
I would like to have a simple archive file system in my engine. Preferably it should use zip or rar format. What I want is compression and crc. Also I want to use standard tools to make an archive, like WinRAR. Casual Googling didn't reveal any good candidates. Also I would like to sell my game, so a liberal licence is a must.
Advertisement
http://www.zlib.net/

The license, which they emphasize in the FAQ is NOT the GNU license:
Quote:
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.3, July 18th, 2005

Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

Jean-loup Gailly jloup@gzip.org
Mark Adler madler@alumni.caltech.edu

*/


[Edited by - fpsgamer on August 12, 2007 4:44:00 PM]
I recommend PhysicsFS - http://icculus.org/physfs/
It supports zip, 7z and some other very old archive formats.
It works on Windows, GNU/Linux, MacOSX, and some other OS'es.
And it is licensed under zlib license.
7 zip standalone? (can among others read/write .zip, .rar and of course .7z)
LZMA SDK 4.49
There's C/C++/C# and Java interfaces included with the SDK.

If you want a practical example of it in use, take a look at the Spring Project
Spring Project Source 0.75b2 (can also be snatched from SVN).
The Spring Project source also includes a Virtual File System (and so does Ogre 3D btw).

This topic is closed to new replies.

Advertisement