User's Manual

61
English
and maintained by a team at PUC-Rio in Brazil.
The implementation is not derived from licensed
software.
Before Lua 5.0, Lua used its own license, which
was very close to the zlib license and others, but
not quite the same. Check the source distribution
for the exact license text for each version before
Lua 5.0. Nevertheless, if you wish to use those old
versions, you may hereby assume that they have all
been re-licensed under the MIT license as described
above.
Copyright © 1994–2014 Lua.org, PUC-Rio.
Permission is hereby granted, free of charge, to
any person obtaining a copy of this software and
associated documentation les (the "Software"), to
deal in the Software without restriction, including
without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission
notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT
WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR
A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
zziplib
The zziplib library is intentionally lightweight, it
offers the ability to easily extract data from files
archived in a single zip le. Applications can bundle
les into a single zip archive and access them. The
implementation is based only on the (free) subset
of compression with the zlib algorithm which is
actually used by the zip/unzip tools.
The library allows reading zip archives in a number
of ways,
archive mode:
reading the zip directory and extracting les from
it. This is the traditional mode as seen with unzip-
utilities. Some extra unzip-utiles for transparent/
magic mode are shipped as well.
replacement mode:
Use ZZIP_FILE / ZZIP_DIR pointers provided by
zziplib and put them to work with routines originally
developped to work with real directories and file
handles. The API calls do follow traditional synopsis
from posix/stdio.
transparent mode:
Use replacement handles and allow the open()-calls
to automatically detect when a le is contained in a
zip archive or when it is a real le in the le system.
A filepath can be partly in a real filesystem and
partly within the zip archive when one is seen.
ext magic:
Use the same lepath to access either a zipped or
real le - it looks for a real le and there is none
then every subdirectory of the path is checked,
a ".zip" extension appended, and the zipped file
transparently opened. This can speed up dat-file
development dramatically.
io/xor magic:
The access to the filesystem can be hooked up -
examples are given for xor obfuscation which is
great for game artwork and AI data. A small intro
for SDLrwops usage is given as well.