diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luazip/doc/us')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luazip/doc/us/examples.html | 130 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luazip/doc/us/index.html | 125 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luazip/doc/us/license.html | 125 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luazip/doc/us/luazip-128.png | bin | 0 -> 11156 bytes | |||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luazip/doc/us/manual.html | 181 |
5 files changed, 561 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luazip/doc/us/examples.html b/Build/source/texk/web2c/luatexdir/luazip/doc/us/examples.html new file mode 100644 index 00000000000..cc55405315a --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luazip/doc/us/examples.html @@ -0,0 +1,130 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html> +<head> + <title>LuaZip: Reading files inside zip files</title> + <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +</head> +<body> + +<div id="container"> + +<div id="product"> + <div id="product_logo"> + <a href="http://www.keplerproject.org"><img alt="LuaZip logo" src="luazip-128.png"/></a> + </div> + <div id="product_name"><big><strong>LuaZip</strong></big></div> + <div id="product_description">Reading files inside zip files</div> +</div> <!-- id="product" --> + +<div id="main"> + +<div id="navigation"> +<h1>LuaZip</h1> + <ul> + <li><a href="index.html">Home</a> + <ul> + <li><a href="index.html#overview">Overview</a></li> + <li><a href="index.html#status">Status</a></li> + <li><a href="index.html#download">Download</a></li> + <li><a href="index.html#history">History</a></li> + <li><a href="index.html#credits">Credits</a></li> + <li><a href="index.html#contact">Contact</a></li> + </ul> + </li> + <li><a href="manual.html">Manual</a> + <ul> + <li><a href="manual.html#introduction">Introduction</a></li> + <li><a href="manual.html#installation">Installation</a></li> + <li><a href="manual.html#reference">Reference</a></li> + </ul> + </li> + <li><strong>Examples</strong></li> + <li><a href="http://luaforge.net/projects/luazip/">Project</a> + <ul> + <li><a href="http://luaforge.net/tracker/?group_id=8">Bug Tracker</a></li> + <li><a href="http://luaforge.net/scm/?group_id=8">CVS</a></li> + </ul> + </li> + <li><a href="license.html">License</a></li> + </ul> +</div> <!-- id="navigation" --> + +<div id="content"> + + +<h2><a name="examples"></a>Example</h2> + +<p> +Suppose we have the following file hierarchy: +</p> + +<pre class="example"> +/a + /b + c.zip +/a2 + b2.ext2 +/a3.ext3 +/luazip.zip +</pre> + +<ul> +<li>c.zip contains the file 'd.txt'</li> +<li>b2.ext2 is a zip file containing the file 'c2/d2.txt'</li> +<li>a3.ext3 is a zip file containing the file 'b3/c3/d3.txt'</li> +<li>luazip.zip contains the files 'luazip.h', 'luazip.c', 'Makefile', 'README'</li> +</ul> + +Below is a small sample code displaying the basic use of the library. + +<pre class="example"> +require "zip" + +local zfile, err = zip.open('luazip.zip') + +-- print the filenames of the files inside the zip +for file in zfile:files() do + print(file.filename) +end + +-- open README and print it +local f1, err = zfile:open('README') +local s1 = f1:read("*a") +print(s1) + +f1:close() +zfile:close() + +-- open d.txt inside c.zip +local d, err = zip.openfile('a/b/c/d.txt') +assert(d, err) +d:close() + +-- open d2.txt inside b2.ext2 +local d2, err = zip.openfile('a2/b2/c2/d2.txt', "ext2") +assert(d2, err) +d2:close() + +-- open d3.txt inside a3.ext3 +local d3, err = zip.openfile('a3/b3/c3/d3.txt', {"ext2", "ext3"}) +assert(d3, err) +d3:close() +</pre> + +</div> <!-- id="content" --> + +</div> <!-- id="main" --> + +<div id="about"> + <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> + <p><small> + $Id: examples.html,v 1.4 2006/03/23 20:45:21 carregal Exp $ + </small></p> +</div> <!-- id="about" --> + +</div> <!-- id="container" --> + +</body> +</html> diff --git a/Build/source/texk/web2c/luatexdir/luazip/doc/us/index.html b/Build/source/texk/web2c/luatexdir/luazip/doc/us/index.html new file mode 100644 index 00000000000..ca5aad3f412 --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luazip/doc/us/index.html @@ -0,0 +1,125 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html> +<head> + <title>LuaZip: Reading files inside zip files</title> + <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +</head> +<body> + +<div id="container"> + +<div id="product"> + <div id="product_logo"> + <a href="http://www.keplerproject.org"><img alt="LuaZip logo" src="luazip-128.png"/></a> + </div> + <div id="product_name"><big><strong>LuaZip</strong></big></div> + <div id="product_description">Reading files inside zip files</div> +</div> <!-- id="product" --> + +<div id="main"> + +<div id="navigation"> +<h1>LuaZip</h1> + <ul> + <li><strong>Home</strong> + <ul> + <li><a href="index.html#overview">Overview</a></li> + <li><a href="index.html#status">Status</a></li> + <li><a href="index.html#download">Download</a></li> + <li><a href="index.html#history">History</a></li> + <li><a href="index.html#credits">Credits</a></li> + <li><a href="index.html#contact">Contact</a></li> + </ul> + </li> + <li><a href="manual.html">Manual</a> + <ul> + <li><a href="manual.html#introduction">Introduction</a></li> + <li><a href="manual.html#installation">Installation</a></li> + <li><a href="manual.html#reference">Reference</a></li> + </ul> + </li> + <li><a href="examples.html">Examples</a></li> + <li><a href="http://luaforge.net/projects/luazip/">Project</a> + <ul> + <li><a href="http://luaforge.net/tracker/?group_id=8">Bug Tracker</a></li> + <li><a href="http://luaforge.net/scm/?group_id=8">CVS</a></li> + </ul> + </li> + <li><a href="license.html">License</a></li> + </ul> +</div> <!-- id="navigation" --> + +<div id="content"> + +<h2><a name="overview"></a>Overview</h2> + +<p>LuaZip is a lightweight <a href="http://www.lua.org">Lua</a> 5.0 extension library +used to read files stored inside zip files. The API is very similar to the standard +Lua I/O library API.</p> + +<p>LuaZip is free software and uses the same <a href="license.html">license</a> as Lua 5.0.</p> + +<h2><a name="status"></a>Status</h2> + +<p>Current version is 1.2.2. It was developed for Lua 5.0.</p> + +<p>Version 1.2.2 follows the +<a href="http://www.keplerproject.org/compat">package model</a> +for Lua 5.1 (see section <a href="manual.html#installation">Installation</a> +for more details).</p> + +<h2><a name="download"></a>Download</h2> + +<p>LuaZip source can be downloaded from its +<a href="http://luaforge.net/projects/luazip/files">Lua Forge</a> +page. If you are using +<a href="http://luabinaries.luaforge.net">LuaBinaries</a> Release 2 +a Windows binary version of LuaZip can be found at the same +LuaForge page.</p> + +<h2><a name="history"></a>History</h2> + +<dl class="history"> + <dt><strong>Version 1.2.2</strong> [24/Mar/2006]</dt> + <dd>Minor fixes on makefile and config</dd> + + <dt><strong>Version 1.2.1</strong> [08/Jun/2005]</dt> + <dd>Minor bug fixes</dd> + + <dt><strong>Version 1.2.0</strong> [01/Dec/2004]</dt> + <dd></dd> + + <dt><strong><a href="http://www.keplerproject.org/luazip/1.1">Version 1.1.3</a></strong> [25/Jun/2004]</dt> + <dd>First Public Release</dd> +</dl> + +<h2><a name="credits"></a>Credits</h2> + +<p>LuaZip was designed and coded by Danilo Tuler as part of the +<a href="http://www.keplerproject.org">Kepler Project</a>.</p> + +<h2><a name="contact"></a>Contact</h2> + +<p>For more information please +<a href="mailto:info-NO-SPAM-THANKS@keplerproject.org">contact</a> us. +Comments are welcome!</p> + +<p>You can also reach other Kepler developers and users on the Kepler Project +<a href="http://luaforge.net/mail/?group_id=104">mailing list</a>.</p> + +</div> <!-- id="content" --> + +</div> <!-- id="main" --> + +<div id="about"> + <p><a href="http://validator.w3.org/check?uri=referer"> + <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> + <p><small>$Id: index.html,v 1.7 2006/03/23 20:45:21 carregal Exp $</small></p> +</div> <!-- id="about" --> + +</div> <!-- id="container" --> + +</body> +</html> diff --git a/Build/source/texk/web2c/luatexdir/luazip/doc/us/license.html b/Build/source/texk/web2c/luatexdir/luazip/doc/us/license.html new file mode 100644 index 00000000000..f9fd47f9cfe --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luazip/doc/us/license.html @@ -0,0 +1,125 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html> +<head> + <title>LuaZip: Reading files inside zip files</title> + <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +</head> +<body> + +<div id="container"> + +<div id="product"> + <div id="product_logo"> + <a href="http://www.keplerproject.org"><img alt="LuaZip logo" src="luazip-128.png"/></a> + </div> + <div id="product_name"><big><strong>LuaZip</strong></big></div> + <div id="product_description">Reading files inside zip files</div> +</div> <!-- id="product" --> + +<div id="main"> + +<div id="navigation"> +<h1>LuaZip</h1> + <ul> + <li><a href="index.html">Home</a> + <ul> + <li><a href="index.html#overview">Overview</a></li> + <li><a href="index.html#status">Status</a></li> + <li><a href="index.html#download">Download</a></li> + <li><a href="index.html#history">History</a></li> + <li><a href="index.html#credits">Credits</a></li> + <li><a href="index.html#contact">Contact</a></li> + </ul> + </li> + <li><a href="manual.html">Manual</a> + <ul> + <li><a href="manual.html#introduction">Introduction</a></li> + <li><a href="manual.html#installation">Installation</a></li> + <li><a href="manual.html#reference">Reference</a></li> + </ul> + </li> + <li><a href="examples.html">Examples</a></li> + <li><a href="http://luaforge.net/projects/luazip/">Project</a> + <ul> + <li><a href="http://luaforge.net/tracker/?group_id=8">Bug Tracker</a></li> + <li><a href="http://luaforge.net/scm/?group_id=8">CVS</a></li> + </ul> + </li> + <li><strong>License</strong></li> + </ul> +</div> <!-- id="navigation" --> + +<div id="content"> + +<h2>License</h2> + +<p> +LuaZip is free software: it can be used for both academic and commercial purposes at absolutely no cost. +There are no royalties or GNU-like "copyleft" restrictions. +LuaZip qualifies as <a href="http://www.opensource.org/docs/definition.html">Open Source</a> +software. +Its licenses are compatible with <a href="http://www.gnu.org/licenses/gpl.html">GPL</a>. +LuaZip is not in the public domain and the <a href="http://www.keplerproject.org">Kepler Project</a> +keep its copyright. The legal details are below. +</p> + +<p> +The spirit of the license is that +you are free to use LuaZip for any purpose at no cost without having to ask us. +The only requirement is that +if you do use LuaZip, +then you should give us credit by including the appropriate copyright notice +somewhere in your product or its documentation. +</p> + +<p> +The LuaZip library was designed and implemented by Danilo Tuler. +Part of the code is a derived work from the Lua standard I/O library, copyrighted by Tecgraf, PUC-Rio. +</p> + +<hr/> +<p> +Copyright © 2003-2006 The Kepler Project. +</p> + +<p> +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (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: +</p> + +<p> +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. +</p> + +<p> +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. +</p> + +</div> <!-- id="content" --> + +</div> <!-- id="main" --> + +<div id="about"> + <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> + <p><small> + $Id: license.html,v 1.5 2006/03/25 14:59:02 carregal Exp $ + </small></p> +</div> <!-- id="about" --> + +</div> <!-- id="container" --> + +</body> +</html> diff --git a/Build/source/texk/web2c/luatexdir/luazip/doc/us/luazip-128.png b/Build/source/texk/web2c/luatexdir/luazip/doc/us/luazip-128.png Binary files differnew file mode 100644 index 00000000000..03b2e379b59 --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luazip/doc/us/luazip-128.png diff --git a/Build/source/texk/web2c/luatexdir/luazip/doc/us/manual.html b/Build/source/texk/web2c/luatexdir/luazip/doc/us/manual.html new file mode 100644 index 00000000000..d9103af5539 --- /dev/null +++ b/Build/source/texk/web2c/luatexdir/luazip/doc/us/manual.html @@ -0,0 +1,181 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html> +<head> + <title>LuaZip: Reading files inside zip files</title> + <link rel="stylesheet" href="http://www.keplerproject.org/doc.css" type="text/css"/> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +</head> +<body> + +<div id="container"> + +<div id="product"> + <div id="product_logo"> + <a href="http://www.keplerproject.org"><img alt="LuaZip logo" src="luazip-128.png"/></a> + </div> + <div id="product_name"><big><strong>LuaZip</strong></big></div> + <div id="product_description">Reading files inside zip files</div> +</div> <!-- id="product" --> + +<div id="main"> + +<div id="navigation"> +<h1>LuaZip</h1> + <ul> + <li><a href="index.html">Home</a> + <ul> + <li><a href="index.html#overview">Overview</a></li> + <li><a href="index.html#status">Status</a></li> + <li><a href="index.html#download">Download</a></li> + <li><a href="index.html#history">History</a></li> + <li><a href="index.html#credits">Credits</a></li> + <li><a href="index.html#contact">Contact</a></li> + </ul> + </li> + <li><strong>Manual</strong> + <ul> + <li><a href="manual.html#introduction">Introduction</a></li> + <li><a href="manual.html#installation">Installation</a></li> + <li><a href="manual.html#reference">Reference</a></li> + </ul> + </li> + <li><a href="examples.html">Examples</a></li> + <li><a href="http://luaforge.net/projects/luazip/">Project</a> + <ul> + <li><a href="http://luaforge.net/tracker/?group_id=8">Bug Tracker</a></li> + <li><a href="http://luaforge.net/scm/?group_id=8">CVS</a></li> + </ul> + </li> + <li><a href="license.html">License</a></li> + </ul> +</div> <!-- id="navigation" --> + +<div id="content"> + + +<h2><a name="introduction"></a>Introduction</h2> + +<p>LuaZip is a lightweight <a href="http://www.lua.org">Lua</a> 5.0 extension library +that can be used to read files stored inside zip files. It uses +<a href="http://zziplib.sourceforge.net">zziplib</a> to do all the hard work.</p> + +<p>The API exposed to Lua is very simple and very similiar to the usual file handling +functions provided by the +<a href="http://www.lua.org/manual/5.0/manual.html#5.6">I/O Lua standard library</a>. +In fact, the API is so similar that parts of this manual are extracted from the Lua manual, +copyrighted by Tecgraf, PUC-Rio.</p> + +<h2><a name="installation"></a>Installation</h2> + +<p>LuaZip follows the +<a href="http://www.keplerproject.org/compat/">package model</a> +for Lua 5.1, therefore it should be "installed". Refer to +<a href="http://www.keplerproject.org/compat/manual.html#configuration"> +Compat-5.1 configuration</a> section about how to install the compiled +binary properly.</p> + +<p>If you are using Unix you may need to download +<a href="http://zziplib.sourceforge.net">zziplib 0.13.36</a></p> + +<p>If you are using Windows, the binary version of LuaZip includes zziplib +(<code>zlib1.dll</code>). </p> + +<h2><a name="reference"></a>Reference</h2> + +<dl> + <dt><strong>zip.open (filename)</strong></dt> + <dd>This function opens a zip file and returns a new zip file handle. In case of + error it returns nil and an error message. Unlike <code>io.open</code>, there is no + <code>mode</code> parameter, as the only supported mode is "read".</dd> + + <dt><strong>zip.openfile (filename [, extensions]])</strong></dt> + <dd>This function opens a file and returns a file handle. In case of + error it returns nil and an error message. Unlike <code>io.open</code>, there is no + <code>mode</code> parameter, as the only supported mode is "read".<br/> + This function implements a virtual file system based on optionally compressed files. + Instead of simply looking for a file at a given path, this function goes recursively up + through all path separators ("/") looking for zip files there. If it finds a zip file, + this function use the remaining path to open the requested file.<br/> + The optional parameter <em>extensions</em> allows the use of file extensions other than .zip + during the lookup. It can be a string corresponding to the extension or an indexed table + with the lookup extensions sequence.</dd> + + <dt><strong>zfile:close ()</strong></dt> + <dd>This function closes a zfile opened by <code>zip.open</code></dd> + + <dt><strong>zfile:files ()</strong></dt> + <dd>Returns an iterator function that returns a new table containing the + following information each time it is called: + <ul> + <li><code>filename</code>: the full path of a file</li> + <li><code>compressed_size</code>: the compressed size of the file in bytes</li> + <li><code>uncompressed_size</code>: the uncompressed size of the file in bytes</li> + </ul> + </dd> + + <dt><strong>zfile:open (filename)</strong></dt> + <dd>This function opens a file that is stored inside the zip file opened by <code>zip.open</code>.<br/> + The filename may contain the full path of the file contained inside the zip. The + directory separator must be '/'.<br/> + Unlike <code>f:open</code>, there is no <code>mode</code> parameter, as the only + supported mode is "read".</dd> + + <dt><strong>file:read (format1, ...)</strong></dt> + <dd>Reads a <code>file</code> according to the given formats, which specify what to read.<br/> + For each format, the function returns a string with the characters read, or nil if it cannot read + data with the specified format. When called without formats, it uses a default format that reads + the entire next line (see below).<br/> + The available formats are: + <ul> + <li><code>"*a"</code>: reads the whole file, starting at the current position. On end of file, it + returns the empty string.</li> + <li><code>"*l"</code>: reads the next line (skipping the end of line), returns nil on end of file. + This is the default format.</li> + <li><code><i>number</i></code>: reads a string with up to that number of characters, returning nil + on end of file.</li> + </ul> + <br/> + Unlike the standard I/O read, the format <code>"*n"</code> is not supported.</dd> + + <dt><strong>file:seek ([whence] [, offset])</strong></dt> + <dd>Sets and gets the file position, measured from the beginning of the file, to the position given + by <code>offset</code> plus a base specified by the string <code>whence</code>, as follows: + <ul> + <li><code>set</code>: base is position 0 (beginning of the file);</li> + <li><code>cur</code>: base is current position;</li> + <li><code>end</code>: base is end of file;</li> + </ul> + In case of success, function <code>seek</code> returns the final file position, measured in bytes + from the beginning of the file. If this function fails, it returns nil, plus an error string. + The default value for <code>whence</code> is <code>"cur"</code>, and for <code>offset</code> is 0. + Therefore, the call <code>file:seek()</code> returns the current file position, without changing + it; the call <code>file:seek("set")</code> sets the position to the beginning of the file (and returns 0); + and the call <code>file:seek("end")</code> sets the position to the end of the file, and returns its + size.</dd> + + <dt><strong>file:close ()</strong></dt> + <dd>This function closes a file opened by <code>zfile:open</code>.</dd> + + <dt><strong>file:lines ()</strong></dt> + <dd>Returns an iterator function that returns a new line from the file each time it is called. + Therefore, the construction<br/> + <pre class="example">for line in file:lines() do ... end</pre> + will iterate over all lines of the file.</dd> +</dl> + +</div> <!-- id="content" --> + +</div> <!-- id="main" --> + +<div id="about"> + <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p> + <p><small> + $Id: manual.html,v 1.10 2006/03/25 14:59:02 carregal Exp $ + </small></p> +</div> <!-- id="about" --> + +</div> <!-- id="container" --> + +</body> +</html> |