diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-08-10 21:04:41 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-08-10 21:04:41 -0400 |
commit | 25199ab4c29057d7c0a73812fc8f2ac3605c1d86 (patch) | |
tree | 78f93a21b23da48b8cd0113e8262876426cfa7e6 /Zip | |
parent | 533ee3ceb098919da478a6be57a2f4342712aca5 (diff) | |
download | zip-crystal-25199ab4c29057d7c0a73812fc8f2ac3605c1d86.tar.bz2 zip-crystal-25199ab4c29057d7c0a73812fc8f2ac3605c1d86.zip |
add documentation
Diffstat (limited to 'Zip')
-rw-r--r-- | Zip/Archive.html | 472 | ||||
-rw-r--r-- | Zip/CompressionMethod.html | 815 | ||||
-rw-r--r-- | Zip/DeflateCompressionHelper.html | 191 | ||||
-rw-r--r-- | Zip/Entry.html | 636 | ||||
-rw-r--r-- | Zip/Error.html | 179 | ||||
-rw-r--r-- | Zip/Extra.html | 370 | ||||
-rw-r--r-- | Zip/GeneralFlags.html | 649 | ||||
-rw-r--r-- | Zip/NoneCompressionHelper.html | 165 | ||||
-rw-r--r-- | Zip/Source.html | 335 | ||||
-rw-r--r-- | Zip/TimeHelper.html | 165 | ||||
-rw-r--r-- | Zip/Version.html | 312 | ||||
-rw-r--r-- | Zip/Writer.html | 389 | ||||
-rw-r--r-- | Zip/WriterEntry.html | 319 |
13 files changed, 4997 insertions, 0 deletions
diff --git a/Zip/Archive.html b/Zip/Archive.html new file mode 100644 index 0000000..ea6e914 --- /dev/null +++ b/Zip/Archive.html @@ -0,0 +1,472 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::Archive - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">class</span> Zip::Archive + +</h1> + + + <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/Archive.html">Zip::Archive</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul> + + + + + <h2>Overview</h2> + + <p>Input archive.</p> + +<p>Use <code><a href="../Zip.html#read%28slice%3ABytes%2C%26cb%3AArchive-%3E%29%3AVoid-class-method">Zip.read</a>()</code> instead of instantiating this class directly.</p> + + + + + + <h2>Included Modules</h2> + <ul class="other-types-list"> + + <li class="other-type">Enumerable(Entry)</li> + + <li class="other-type">Iterable</li> + + </ul> + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + + <h2>Class Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#new%28io%3ASource%29-class-method" class="signature"><strong>.new</strong>(io : Source)</a> + + <div class="summary"><p>Create new Zip::Archive from input Zip::Source.</p></div> + + </li> + + </ul> + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#%5B%5D%28path%3AString%29%3AEntry-instance-method" class="signature"><strong>#[]</strong>(path : String) : Entry</a> + + <div class="summary"><p>Get Zip::Entry by path.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#%5B%5D%28id%3AInt%29%3AEntry-instance-method" class="signature"><strong>#[]</strong>(id : Int) : Entry</a> + + <div class="summary"><p>Get Zip::Entry by number.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#%5B%5D%3F%28id%3AInt%29%3AEntry%7CNil-instance-method" class="signature"><strong>#[]?</strong>(id : Int) : Entry | Nil</a> + + <div class="summary"><p>Get Zip::Entry by number, or nil if it doesn't exist</p></div> + + </li> + + <li class="entry-summary"> + <a href="#%5B%5D%3F%28path%3AString%29%3AEntry%7CNil-instance-method" class="signature"><strong>#[]?</strong>(path : String) : Entry | Nil</a> + + <div class="summary"><p>Return Zip::Entry from path, or nil if it doesn't exist.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#comment%3AString-instance-method" class="signature"><strong>#comment</strong> : String</a> + + </li> + + <li class="entry-summary"> + <a href="#each%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#each</strong>(*args, **options, &block)</a> + + </li> + + <li class="entry-summary"> + <a href="#each%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#each</strong>(*args, **options)</a> + + </li> + + <li class="entry-summary"> + <a href="#entries%3AArray%28Zip%3A%3AEntry%29-instance-method" class="signature"><strong>#entries</strong> : Array(Zip::Entry)</a> + + </li> + + <li class="entry-summary"> + <a href="#size%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#size</strong>(*args, **options, &block)</a> + + </li> + + <li class="entry-summary"> + <a href="#size%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#size</strong>(*args, **options)</a> + + </li> + + </ul> + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</div> + + + <h2>Class Method Detail</h2> + + <div class="entry-detail" id="new(io:Source)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(io : <a href="../Zip/Source.html">Source</a>) + + <a class="method-permalink" href="#new%28io%3ASource%29-class-method">#</a> + </div> + + <div class="doc"><p>Create new Zip::Archive from input Zip::Source.</p> + +<p>Use <code><a href="../Zip.html#read%28slice%3ABytes%2C%26cb%3AArchive-%3E%29%3AVoid-class-method">Zip.read</a>()</code> instead of calling this method directly.</p></div> + + <br/> + <div> + + </div> + </div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="[](path:String):Entry-instance-method"> + <div class="signature"> + + def <strong>[]</strong>(path : String) : <a href="../Zip/Entry.html">Entry</a> + + <a class="method-permalink" href="#%5B%5D%28path%3AString%29%3AEntry-instance-method">#</a> + </div> + + <div class="doc"><p>Get Zip::Entry by path.</p> + +<p>Example:</p> + +<p># get bar.txt and read it into memory io +io = MemoryIO.new +zip["bar.txt"].read(io)</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="[](id:Int):Entry-instance-method"> + <div class="signature"> + + def <strong>[]</strong>(id : Int) : <a href="../Zip/Entry.html">Entry</a> + + <a class="method-permalink" href="#%5B%5D%28id%3AInt%29%3AEntry-instance-method">#</a> + </div> + + <div class="doc"><p>Get Zip::Entry by number.</p> + +<p>Example:</p> + +<p># read third entry from archive into memory io +io = MemoryIO.new +zip[2].read(io)</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="[]?(id:Int):Entry|Nil-instance-method"> + <div class="signature"> + + def <strong>[]?</strong>(id : Int) : <a href="../Zip/Entry.html">Entry</a> | Nil + + <a class="method-permalink" href="#%5B%5D%3F%28id%3AInt%29%3AEntry%7CNil-instance-method">#</a> + </div> + + <div class="doc"><p>Get Zip::Entry by number, or nil if it doesn't exist</p> + +<p>Example:</p> + +<p># read third entry from archive into memory io +if e = zip[2] +io = MemoryIO.new +e.read(io) +end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="[]?(path:String):Entry|Nil-instance-method"> + <div class="signature"> + + def <strong>[]?</strong>(path : String) : <a href="../Zip/Entry.html">Entry</a> | Nil + + <a class="method-permalink" href="#%5B%5D%3F%28path%3AString%29%3AEntry%7CNil-instance-method">#</a> + </div> + + <div class="doc"><p>Return Zip::Entry from path, or nil if it doesn't exist.</p> + +<p>Example:</p> + +<p># read bar.txt into memory io if it exists +if e = zip["bar.txt"]? +io = MemoryIO.new +e.read(io) +end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="comment:String-instance-method"> + <div class="signature"> + + def <strong>comment</strong> : String + + <a class="method-permalink" href="#comment%3AString-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="each(*args,**options,&block)-instance-method"> + <div class="signature"> + + def <strong>each</strong>(*args, **options, &block) + + <a class="method-permalink" href="#each%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="each(*args,**options)-instance-method"> + <div class="signature"> + + def <strong>each</strong>(*args, **options) + + <a class="method-permalink" href="#each%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="entries:Array(Zip::Entry)-instance-method"> + <div class="signature"> + + def <strong>entries</strong> : Array(<a href="../Zip/Entry.html">Zip::Entry</a>) + + <a class="method-permalink" href="#entries%3AArray%28Zip%3A%3AEntry%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="size(*args,**options,&block)-instance-method"> + <div class="signature"> + + def <strong>size</strong>(*args, **options, &block) + + <a class="method-permalink" href="#size%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="size(*args,**options)-instance-method"> + <div class="signature"> + + def <strong>size</strong>(*args, **options) + + <a class="method-permalink" href="#size%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + + + + +</div> + +</body> +</html> diff --git a/Zip/CompressionMethod.html b/Zip/CompressionMethod.html new file mode 100644 index 0000000..f18b338 --- /dev/null +++ b/Zip/CompressionMethod.html @@ -0,0 +1,815 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::CompressionMethod - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">enum</span> Zip::CompressionMethod + +</h1> + + + + + + <h2>Overview</h2> + + <p>Compression methods.</p> + + + + + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + <h2>Enum Members</h2> + + <dl> + + <dt class="entry-const" id="NONE"> + <strong>NONE</strong> = <code><span class="n">0</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Stored (no compression)</p> + </dd> + + + <dt class="entry-const" id="SHRUNK"> + <strong>SHRUNK</strong> = <code><span class="n">1</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Shrunk</p> + </dd> + + + <dt class="entry-const" id="REDUCED_1"> + <strong>REDUCED_1</strong> = <code><span class="n">2</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reduced with compression factor 1</p> + </dd> + + + <dt class="entry-const" id="REDUCED_2"> + <strong>REDUCED_2</strong> = <code><span class="n">3</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reduced with compression factor 2</p> + </dd> + + + <dt class="entry-const" id="REDUCED_3"> + <strong>REDUCED_3</strong> = <code><span class="n">4</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reduced with compression factor 3</p> + </dd> + + + <dt class="entry-const" id="REDUCED_4"> + <strong>REDUCED_4</strong> = <code><span class="n">5</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reduced with compression factor 4</p> + </dd> + + + <dt class="entry-const" id="IMPLODED"> + <strong>IMPLODED</strong> = <code><span class="n">6</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Imploded</p> + </dd> + + + <dt class="entry-const" id="TOKENIZED"> + <strong>TOKENIZED</strong> = <code><span class="n">7</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reserved for Tokenizing compression algorithm</p> + </dd> + + + <dt class="entry-const" id="DEFLATE"> + <strong>DEFLATE</strong> = <code><span class="n">8</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Deflated</p> + </dd> + + + <dt class="entry-const" id="DEFLATE64"> + <strong>DEFLATE64</strong> = <code><span class="n">9</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Enhanced Deflating using Deflate64(tm)</p> + </dd> + + + <dt class="entry-const" id="TERSE_OLD"> + <strong>TERSE_OLD</strong> = <code><span class="n">10</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>PKWARE Data Compression Library Imploding (old IBM TERSE)</p> + </dd> + + + <dt class="entry-const" id="RESERVED_11"> + <strong>RESERVED_11</strong> = <code><span class="n">11</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reserved by PKWARE</p> + </dd> + + + <dt class="entry-const" id="BZIP2"> + <strong>BZIP2</strong> = <code><span class="n">12</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>BZIP2</p> + </dd> + + + <dt class="entry-const" id="RESERVED_13"> + <strong>RESERVED_13</strong> = <code><span class="n">13</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reserved by PKWARE</p> + </dd> + + + <dt class="entry-const" id="LZMA"> + <strong>LZMA</strong> = <code><span class="n">14</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>LZMA (EFS)</p> + </dd> + + + <dt class="entry-const" id="RESERVED_15"> + <strong>RESERVED_15</strong> = <code><span class="n">15</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reserved by PKWARE</p> + </dd> + + + <dt class="entry-const" id="RESERVED_16"> + <strong>RESERVED_16</strong> = <code><span class="n">16</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reserved by PKWARE</p> + </dd> + + + <dt class="entry-const" id="RESERVED_17"> + <strong>RESERVED_17</strong> = <code><span class="n">17</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Reserved by PKWARE</p> + </dd> + + + <dt class="entry-const" id="TERSE"> + <strong>TERSE</strong> = <code><span class="n">18</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>IBM TERSE (new)</p> + </dd> + + + <dt class="entry-const" id="LZ77"> + <strong>LZ77</strong> = <code><span class="n">19</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>IBM LZ77 z Architecture (PFS)</p> + </dd> + + + <dt class="entry-const" id="WAVPACK"> + <strong>WAVPACK</strong> = <code><span class="n">97</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>WavPack compressed data</p> + </dd> + + + <dt class="entry-const" id="PPMD"> + <strong>PPMD</strong> = <code><span class="n">98</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>PPMd version I, Rev 1</p> + </dd> + + + </dl> + + + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#bzi_p2%3F-instance-method" class="signature"><strong>#bzi_p2?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#deflat_e64%3F-instance-method" class="signature"><strong>#deflat_e64?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#deflate%3F-instance-method" class="signature"><strong>#deflate?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#imploded%3F-instance-method" class="signature"><strong>#imploded?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#l_z77%3F-instance-method" class="signature"><strong>#l_z77?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#lzma%3F-instance-method" class="signature"><strong>#lzma?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#none%3F-instance-method" class="signature"><strong>#none?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#ppmd%3F-instance-method" class="signature"><strong>#ppmd?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reduced_1%3F-instance-method" class="signature"><strong>#reduced_1?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reduced_2%3F-instance-method" class="signature"><strong>#reduced_2?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reduced_3%3F-instance-method" class="signature"><strong>#reduced_3?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reduced_4%3F-instance-method" class="signature"><strong>#reduced_4?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_11%3F-instance-method" class="signature"><strong>#reserved_11?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_13%3F-instance-method" class="signature"><strong>#reserved_13?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_15%3F-instance-method" class="signature"><strong>#reserved_15?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_16%3F-instance-method" class="signature"><strong>#reserved_16?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_17%3F-instance-method" class="signature"><strong>#reserved_17?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#shrunk%3F-instance-method" class="signature"><strong>#shrunk?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#terse%3F-instance-method" class="signature"><strong>#terse?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#terse_old%3F-instance-method" class="signature"><strong>#terse_old?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#tokenized%3F-instance-method" class="signature"><strong>#tokenized?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#wavpack%3F-instance-method" class="signature"><strong>#wavpack?</strong></a> + + </li> + + </ul> + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="bzi_p2?-instance-method"> + <div class="signature"> + + def <strong>bzi_p2?</strong> + + <a class="method-permalink" href="#bzi_p2%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="deflat_e64?-instance-method"> + <div class="signature"> + + def <strong>deflat_e64?</strong> + + <a class="method-permalink" href="#deflat_e64%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="deflate?-instance-method"> + <div class="signature"> + + def <strong>deflate?</strong> + + <a class="method-permalink" href="#deflate%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="imploded?-instance-method"> + <div class="signature"> + + def <strong>imploded?</strong> + + <a class="method-permalink" href="#imploded%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="l_z77?-instance-method"> + <div class="signature"> + + def <strong>l_z77?</strong> + + <a class="method-permalink" href="#l_z77%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="lzma?-instance-method"> + <div class="signature"> + + def <strong>lzma?</strong> + + <a class="method-permalink" href="#lzma%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="none?-instance-method"> + <div class="signature"> + + def <strong>none?</strong> + + <a class="method-permalink" href="#none%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="ppmd?-instance-method"> + <div class="signature"> + + def <strong>ppmd?</strong> + + <a class="method-permalink" href="#ppmd%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reduced_1?-instance-method"> + <div class="signature"> + + def <strong>reduced_1?</strong> + + <a class="method-permalink" href="#reduced_1%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reduced_2?-instance-method"> + <div class="signature"> + + def <strong>reduced_2?</strong> + + <a class="method-permalink" href="#reduced_2%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reduced_3?-instance-method"> + <div class="signature"> + + def <strong>reduced_3?</strong> + + <a class="method-permalink" href="#reduced_3%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reduced_4?-instance-method"> + <div class="signature"> + + def <strong>reduced_4?</strong> + + <a class="method-permalink" href="#reduced_4%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_11?-instance-method"> + <div class="signature"> + + def <strong>reserved_11?</strong> + + <a class="method-permalink" href="#reserved_11%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_13?-instance-method"> + <div class="signature"> + + def <strong>reserved_13?</strong> + + <a class="method-permalink" href="#reserved_13%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_15?-instance-method"> + <div class="signature"> + + def <strong>reserved_15?</strong> + + <a class="method-permalink" href="#reserved_15%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_16?-instance-method"> + <div class="signature"> + + def <strong>reserved_16?</strong> + + <a class="method-permalink" href="#reserved_16%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_17?-instance-method"> + <div class="signature"> + + def <strong>reserved_17?</strong> + + <a class="method-permalink" href="#reserved_17%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="shrunk?-instance-method"> + <div class="signature"> + + def <strong>shrunk?</strong> + + <a class="method-permalink" href="#shrunk%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="terse?-instance-method"> + <div class="signature"> + + def <strong>terse?</strong> + + <a class="method-permalink" href="#terse%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="terse_old?-instance-method"> + <div class="signature"> + + def <strong>terse_old?</strong> + + <a class="method-permalink" href="#terse_old%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="tokenized?-instance-method"> + <div class="signature"> + + def <strong>tokenized?</strong> + + <a class="method-permalink" href="#tokenized%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="wavpack?-instance-method"> + <div class="signature"> + + def <strong>wavpack?</strong> + + <a class="method-permalink" href="#wavpack%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + + + + +</div> + +</body> +</html> diff --git a/Zip/DeflateCompressionHelper.html b/Zip/DeflateCompressionHelper.html new file mode 100644 index 0000000..0b42f24 --- /dev/null +++ b/Zip/DeflateCompressionHelper.html @@ -0,0 +1,191 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::DeflateCompressionHelper - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">module</span> Zip::DeflateCompressionHelper + +</h1> + + + + + + <h2>Overview</h2> + + <p>Helper methods for compressing and decompressing deflated data.</p> + + + + + + + + + + + + <h2>Direct including types</h2> + <ul class="other-types-list"> + + <li class="other-type"><a href="../Zip/Entry.html">Zip::Entry</a></li> + + <li class="other-type"><a href="../Zip/WriterEntry.html">Zip::WriterEntry</a></li> + + </ul> + + + + + <h2>Defined in:</h2> + + + + + + <h2>Constant Summary</h2> + + <dl> + + <dt class="entry-const" id="ZALLOC_PROC"> + <strong>ZALLOC_PROC</strong> = <code><span class="t">LibZ</span><span class="t">::</span><span class="t">AllocFunc</span>.<span class="k">new</span> <span class="k">do</span> <span class="o">|</span>data, num_items, size<span class="o">|</span> + <span class="t">GC</span>.malloc(num_items <span class="o">*</span> size) +<span class="k">end</span></code> + </dt> + + + <dt class="entry-const" id="ZFREE_PROC"> + <strong>ZFREE_PROC</strong> = <code><span class="t">LibZ</span><span class="t">::</span><span class="t">FreeFunc</span>.<span class="k">new</span> <span class="k">do</span> <span class="o">|</span>data, addr<span class="o">|</span> + <span class="t">GC</span>.free(addr) +<span class="k">end</span></code> + </dt> + + + <dt class="entry-const" id="ZLIB_VERSION"> + <strong>ZLIB_VERSION</strong> = <code><span class="t">LibZ</span>.zlibVersion</code> + </dt> + + + </dl> + + + + + + + + + +<div class="methods-inherited"> + +</div> + + + + + + + +</div> + +</body> +</html> diff --git a/Zip/Entry.html b/Zip/Entry.html new file mode 100644 index 0000000..6626777 --- /dev/null +++ b/Zip/Entry.html @@ -0,0 +1,636 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::Entry - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">class</span> Zip::Entry + +</h1> + + + <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/Entry.html">Zip::Entry</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul> + + + + + <h2>Overview</h2> + + <p>File entry in <code><a href="../Zip/Archive.html">Archive</a></code>.</p> + +<p>Use <code><a href="../Zip.html#read%28slice%3ABytes%2C%26cb%3AArchive-%3E%29%3AVoid-class-method">Zip.read</a>()</code> to read a Zip archive, then <code>#[]</code> to fetch a +specific archive entry.</p> + +<p>Example:</p> + +<p># create MemoryIO +io = MemoryIO.new</p> + +<p># open "foo.zip" +Zip.read("foo.zip") do |zip| +# get "bar.txt" entry from "foo.zip" +e = zip["bar.txt"]</p> + +<pre><code><span class="c"># read contents of "bar.txt" into io</span> +e.read(io)</code></pre> + +<p>end</p> + + + + + + <h2>Included Modules</h2> + <ul class="other-types-list"> + + <li class="other-type"><a href="../Zip/DeflateCompressionHelper.html">Zip::DeflateCompressionHelper</a></li> + + <li class="other-type"><a href="../Zip/NoneCompressionHelper.html">Zip::NoneCompressionHelper</a></li> + + <li class="other-type"><a href="../Zip/TimeHelper.html">Zip::TimeHelper</a></li> + + </ul> + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + + <h2>Class Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#new%28io%3ASource%29-class-method" class="signature"><strong>.new</strong>(io : Source)</a> + + <div class="summary"><p>Instantiate a new <code><a href="../Zip/Entry.html">Entry</a></code> object from the given IO.</p></div> + + </li> + + </ul> + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#comment%3AString-instance-method" class="signature"><strong>#comment</strong> : String</a> + + </li> + + <li class="entry-summary"> + <a href="#compressed_size%3AUInt32-instance-method" class="signature"><strong>#compressed_size</strong> : UInt32</a> + + </li> + + <li class="entry-summary"> + <a href="#crc%3AUInt32-instance-method" class="signature"><strong>#crc</strong> : UInt32</a> + + </li> + + <li class="entry-summary"> + <a href="#external_attr%3AUInt32-instance-method" class="signature"><strong>#external_attr</strong> : UInt32</a> + + </li> + + <li class="entry-summary"> + <a href="#extras%3AArray%28Zip%3A%3AExtra%29-instance-method" class="signature"><strong>#extras</strong> : Array(Zip::Extra)</a> + + </li> + + <li class="entry-summary"> + <a href="#flags%3AUInt16-instance-method" class="signature"><strong>#flags</strong> : UInt16</a> + + </li> + + <li class="entry-summary"> + <a href="#internal_attr%3AUInt16-instance-method" class="signature"><strong>#internal_attr</strong> : UInt16</a> + + </li> + + <li class="entry-summary"> + <a href="#local_extras%3AArray%28Extra%29-instance-method" class="signature"><strong>#local_extras</strong> : Array(Extra)</a> + + <div class="summary"><p>Returns an array of <code><a href="../Zip/Extra.html">Extra</a></code> attributes for this <code><a href="../Zip/Entry.html">Entry</a></code>.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#method%3AZip%3A%3ACompressionMethod-instance-method" class="signature"><strong>#method</strong> : Zip::CompressionMethod</a> + + </li> + + <li class="entry-summary"> + <a href="#path%3AString-instance-method" class="signature"><strong>#path</strong> : String</a> + + </li> + + <li class="entry-summary"> + <a href="#pos%3AUInt32-instance-method" class="signature"><strong>#pos</strong> : UInt32</a> + + </li> + + <li class="entry-summary"> + <a href="#read%28dst_io%3AIO%29%3AUInt32-instance-method" class="signature"><strong>#read</strong>(dst_io : IO) : UInt32</a> + + <div class="summary"><p>Write contents of <code><a href="../Zip/Entry.html">Entry</a></code> into given <code>IO</code>.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#size%3AUInt32-instance-method" class="signature"><strong>#size</strong> : UInt32</a> + + <div class="summary"><p>Return the uncompressed size of this entry in bytes.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#time%3ATime-instance-method" class="signature"><strong>#time</strong> : Time</a> + + </li> + + <li class="entry-summary"> + <a href="#uncompressed_size%3AUInt32-instance-method" class="signature"><strong>#uncompressed_size</strong> : UInt32</a> + + </li> + + <li class="entry-summary"> + <a href="#version%3AUInt16-instance-method" class="signature"><strong>#version</strong> : UInt16</a> + + </li> + + <li class="entry-summary"> + <a href="#version_needed%3AUInt16-instance-method" class="signature"><strong>#version_needed</strong> : UInt16</a> + + </li> + + </ul> + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</div> + + + <h2>Class Method Detail</h2> + + <div class="entry-detail" id="new(io:Source)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(io : <a href="../Zip/Source.html">Source</a>) + + <a class="method-permalink" href="#new%28io%3ASource%29-class-method">#</a> + </div> + + <div class="doc"><p>Instantiate a new <code><a href="../Zip/Entry.html">Entry</a></code> object from the given IO.</p> + +<p>You should not need to call this method directly (use +<code><a href="../Zip/Archive.html#%5B%5D%28path%3AString%29%3AEntry-instance-method">Zip::Archive#[]</a></code> instead).</p></div> + + <br/> + <div> + + </div> + </div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="comment:String-instance-method"> + <div class="signature"> + + def <strong>comment</strong> : String + + <a class="method-permalink" href="#comment%3AString-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="compressed_size:UInt32-instance-method"> + <div class="signature"> + + def <strong>compressed_size</strong> : UInt32 + + <a class="method-permalink" href="#compressed_size%3AUInt32-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="crc:UInt32-instance-method"> + <div class="signature"> + + def <strong>crc</strong> : UInt32 + + <a class="method-permalink" href="#crc%3AUInt32-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="external_attr:UInt32-instance-method"> + <div class="signature"> + + def <strong>external_attr</strong> : UInt32 + + <a class="method-permalink" href="#external_attr%3AUInt32-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="extras:Array(Zip::Extra)-instance-method"> + <div class="signature"> + + def <strong>extras</strong> : Array(<a href="../Zip/Extra.html">Zip::Extra</a>) + + <a class="method-permalink" href="#extras%3AArray%28Zip%3A%3AExtra%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="flags:UInt16-instance-method"> + <div class="signature"> + + def <strong>flags</strong> : UInt16 + + <a class="method-permalink" href="#flags%3AUInt16-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="internal_attr:UInt16-instance-method"> + <div class="signature"> + + def <strong>internal_attr</strong> : UInt16 + + <a class="method-permalink" href="#internal_attr%3AUInt16-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="local_extras:Array(Extra)-instance-method"> + <div class="signature"> + + def <strong>local_extras</strong> : Array(<a href="../Zip/Extra.html">Extra</a>) + + <a class="method-permalink" href="#local_extras%3AArray%28Extra%29-instance-method">#</a> + </div> + + <div class="doc"><p>Returns an array of <code><a href="../Zip/Extra.html">Extra</a></code> attributes for this <code><a href="../Zip/Entry.html">Entry</a></code>.</p> + +<p>Zip archives can (and do) have separate <code><a href="../Zip/Extra.html">Extra</a></code> attributes +associated with the file entry itself, and the file's entry in the +Central Directory.</p> + +<p>The <code><a href="../Zip/Entry.html#extras%3AArray%28Zip%3A%3AExtra%29-instance-method">#extras</a></code> method returns the <code><a href="../Zip/Extra.html">Extra</a></code> attributes from the +file's entry in the Central Directory, and this method returns the +<code><a href="../Zip/Extra.html">Extra</a></code> data from the file entry itself.</p> + +<p>Example:</p> + +<p># open "./foo.zip" +Zip.read("./foo.zip") do |zip| +# get array of local extra attributes from "bar.txt" +extras = zip["bar.txt"].local_extras +end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="method:Zip::CompressionMethod-instance-method"> + <div class="signature"> + + def <strong>method</strong> : <a href="../Zip/CompressionMethod.html">Zip::CompressionMethod</a> + + <a class="method-permalink" href="#method%3AZip%3A%3ACompressionMethod-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="path:String-instance-method"> + <div class="signature"> + + def <strong>path</strong> : String + + <a class="method-permalink" href="#path%3AString-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="pos:UInt32-instance-method"> + <div class="signature"> + + def <strong>pos</strong> : UInt32 + + <a class="method-permalink" href="#pos%3AUInt32-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="read(dst_io:IO):UInt32-instance-method"> + <div class="signature"> + + def <strong>read</strong>(dst_io : IO) : UInt32 + + <a class="method-permalink" href="#read%28dst_io%3AIO%29%3AUInt32-instance-method">#</a> + </div> + + <div class="doc"><p>Write contents of <code><a href="../Zip/Entry.html">Entry</a></code> into given <code>IO</code>.</p> + +<p>Raises an <code><a href="../Zip/Error.html">Error</a></code> if the file contents could not be read or if the +compression method is unsupported.</p> + +<p>Example:</p> + +<p># open "output-bar.txt" for writing +File.open("output-bar.txt", "wb") do |io| +# open archive "./foo.zip" +Zip.read("foo.zip") do |zip| +# write contents of "bar.txt" to "output-bar.txt" +zip["foo.txt"].read(io) +end +end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="size:UInt32-instance-method"> + <div class="signature"> + + def <strong>size</strong> : UInt32 + + <a class="method-permalink" href="#size%3AUInt32-instance-method">#</a> + </div> + + <div class="doc"><p>Return the uncompressed size of this entry in bytes.</p> + +<p>Example:</p> + +<p>Zip.read("foo.zip") do |zip| +size = zip["bar.txt"].size +puts "bar.txt is #{size} bytes." +end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="time:Time-instance-method"> + <div class="signature"> + + def <strong>time</strong> : Time + + <a class="method-permalink" href="#time%3ATime-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="uncompressed_size:UInt32-instance-method"> + <div class="signature"> + + def <strong>uncompressed_size</strong> : UInt32 + + <a class="method-permalink" href="#uncompressed_size%3AUInt32-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="version:UInt16-instance-method"> + <div class="signature"> + + def <strong>version</strong> : UInt16 + + <a class="method-permalink" href="#version%3AUInt16-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="version_needed:UInt16-instance-method"> + <div class="signature"> + + def <strong>version_needed</strong> : UInt16 + + <a class="method-permalink" href="#version_needed%3AUInt16-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + + + + +</div> + +</body> +</html> diff --git a/Zip/Error.html b/Zip/Error.html new file mode 100644 index 0000000..fc71ef7 --- /dev/null +++ b/Zip/Error.html @@ -0,0 +1,179 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::Error - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">class</span> Zip::Error + +</h1> + + + <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/Error.html">Zip::Error</a></li><li class="superclass">Exception</li><li class="superclass">Reference</li><li class="superclass">Object</li></ul> + + + + + <h2>Overview</h2> + + <p>Wrapper class for exceptions.</p> + + + + + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + + + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + + + + + + + + +</div> + + + + + + + +</div> + +</body> +</html> diff --git a/Zip/Extra.html b/Zip/Extra.html new file mode 100644 index 0000000..cb489df --- /dev/null +++ b/Zip/Extra.html @@ -0,0 +1,370 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::Extra - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">class</span> Zip::Extra + +</h1> + + + <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/Extra.html">Zip::Extra</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul> + + + + + <h2>Overview</h2> + + <p>Extra data associated with <code><a href="../Zip/Entry.html">Entry</a></code>.</p> + +<p>You should not need to instantiate this class directly; use +<code><a href="../Zip/Entry.html#extras%3AArray%28Zip%3A%3AExtra%29-instance-method">Zip::Entry#extras</a></code> or <code><a href="../Zip/Entry.html#local_extras%3AArray%28Extra%29-instance-method">Zip::Entry#local_extras</a></code> instead.</p> + +<p>Example:</p> + +<p># open "foo.zip" +Zip.read("foo.zip") do |zip| +# get extra data associated with "bar.txt" +extras = zip["bar.txt"].extras +end</p> + + + + + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + + <h2>Class Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#new%28code%3AUInt16%2Cdata%3ABytes%29-class-method" class="signature"><strong>.new</strong>(code : UInt16, data : Bytes)</a> + + </li> + + <li class="entry-summary"> + <a href="#new%28io%29-class-method" class="signature"><strong>.new</strong>(io)</a> + + </li> + + </ul> + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#code%3AUInt16-instance-method" class="signature"><strong>#code</strong> : UInt16</a> + + </li> + + <li class="entry-summary"> + <a href="#code%3D%28code%29-instance-method" class="signature"><strong>#code=</strong>(code)</a> + + </li> + + <li class="entry-summary"> + <a href="#data%3ASlice%28UInt8%29-instance-method" class="signature"><strong>#data</strong> : Slice(UInt8)</a> + + </li> + + <li class="entry-summary"> + <a href="#data%3D%28data%29-instance-method" class="signature"><strong>#data=</strong>(data)</a> + + </li> + + <li class="entry-summary"> + <a href="#size%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#size</strong>(*args, **options, &block)</a> + + </li> + + <li class="entry-summary"> + <a href="#size%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#size</strong>(*args, **options)</a> + + </li> + + <li class="entry-summary"> + <a href="#to_s%28io%29%3AUInt32-instance-method" class="signature"><strong>#to_s</strong>(io) : UInt32</a> + + </li> + + </ul> + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + +</div> + + + <h2>Class Method Detail</h2> + + <div class="entry-detail" id="new(code:UInt16,data:Bytes)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(code : UInt16, data : Bytes) + + <a class="method-permalink" href="#new%28code%3AUInt16%2Cdata%3ABytes%29-class-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="new(io)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(io) + + <a class="method-permalink" href="#new%28io%29-class-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="code:UInt16-instance-method"> + <div class="signature"> + + def <strong>code</strong> : UInt16 + + <a class="method-permalink" href="#code%3AUInt16-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="code=(code)-instance-method"> + <div class="signature"> + + def <strong>code=</strong>(code) + + <a class="method-permalink" href="#code%3D%28code%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="data:Slice(UInt8)-instance-method"> + <div class="signature"> + + def <strong>data</strong> : Slice(UInt8) + + <a class="method-permalink" href="#data%3ASlice%28UInt8%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="data=(data)-instance-method"> + <div class="signature"> + + def <strong>data=</strong>(data) + + <a class="method-permalink" href="#data%3D%28data%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="size(*args,**options,&block)-instance-method"> + <div class="signature"> + + def <strong>size</strong>(*args, **options, &block) + + <a class="method-permalink" href="#size%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="size(*args,**options)-instance-method"> + <div class="signature"> + + def <strong>size</strong>(*args, **options) + + <a class="method-permalink" href="#size%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="to_s(io):UInt32-instance-method"> + <div class="signature"> + + def <strong>to_s</strong>(io) : UInt32 + + <a class="method-permalink" href="#to_s%28io%29%3AUInt32-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + + + + +</div> + +</body> +</html> diff --git a/Zip/GeneralFlags.html b/Zip/GeneralFlags.html new file mode 100644 index 0000000..4831e42 --- /dev/null +++ b/Zip/GeneralFlags.html @@ -0,0 +1,649 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::GeneralFlags - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">enum</span> Zip::GeneralFlags + +</h1> + + + + + + <h2>Overview</h2> + + <p>General flags.</p> + +<p>Used by local header and central directory header.</p> + + + + + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + <h2>Enum Members</h2> + + <dl> + + <dt class="entry-const" id="ENCRYPTION"> + <strong>ENCRYPTION</strong> = <code><span class="n">1</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>encrypted using weak encryption</p> + </dd> + + + <dt class="entry-const" id="COMPRESSION_OPTION_1"> + <strong>COMPRESSION_OPTION_1</strong> = <code><span class="n">2</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>compression method-specific flag</p> + </dd> + + + <dt class="entry-const" id="COMPRESSION_OPTION_2"> + <strong>COMPRESSION_OPTION_2</strong> = <code><span class="n">4</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>compression method-specific flag</p> + </dd> + + + <dt class="entry-const" id="FOOTER"> + <strong>FOOTER</strong> = <code><span class="n">8</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>this entry has a data descriptor footer</p> + </dd> + + + <dt class="entry-const" id="RESERVED_4"> + <strong>RESERVED_4</strong> = <code><span class="n">16</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>reserved flag</p> + </dd> + + + <dt class="entry-const" id="PATCH"> + <strong>PATCH</strong> = <code><span class="n">32</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>this entry is patch data</p> + </dd> + + + <dt class="entry-const" id="STRONG_ENCRYPTION"> + <strong>STRONG_ENCRYPTION</strong> = <code><span class="n">64</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>this entry uses strong encryption</p> + </dd> + + + <dt class="entry-const" id="RESERVED_7"> + <strong>RESERVED_7</strong> = <code><span class="n">128</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>reserved flag</p> + </dd> + + + <dt class="entry-const" id="RESERVED_8"> + <strong>RESERVED_8</strong> = <code><span class="n">256</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>reserved flag</p> + </dd> + + + <dt class="entry-const" id="RESERVED_9"> + <strong>RESERVED_9</strong> = <code><span class="n">512</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>reserved flag</p> + </dd> + + + <dt class="entry-const" id="RESERVED_10"> + <strong>RESERVED_10</strong> = <code><span class="n">1024</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>reserved flag</p> + </dd> + + + <dt class="entry-const" id="EFS"> + <strong>EFS</strong> = <code><span class="n">2048</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>the file name and comment for this entry are UTF-8 encoded.</p> + </dd> + + + <dt class="entry-const" id="RESERVED_12"> + <strong>RESERVED_12</strong> = <code><span class="n">4096</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>reserved flag</p> + </dd> + + + <dt class="entry-const" id="MASKED_VALUES"> + <strong>MASKED_VALUES</strong> = <code><span class="n">8192</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>Some fields in the local header are masked (that is, empty).</p> + </dd> + + + <dt class="entry-const" id="RESERVED_14"> + <strong>RESERVED_14</strong> = <code><span class="n">16384</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>reserved flag</p> + </dd> + + + <dt class="entry-const" id="RESERVED_15"> + <strong>RESERVED_15</strong> = <code><span class="n">32768</span></code> + </dt> + + <dd class="entry-const-doc"> + <p>reserved flag</p> + </dd> + + + </dl> + + + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#compression_option_1%3F-instance-method" class="signature"><strong>#compression_option_1?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#compression_option_2%3F-instance-method" class="signature"><strong>#compression_option_2?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#efs%3F-instance-method" class="signature"><strong>#efs?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#encryption%3F-instance-method" class="signature"><strong>#encryption?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#footer%3F-instance-method" class="signature"><strong>#footer?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#masked_values%3F-instance-method" class="signature"><strong>#masked_values?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#patch%3F-instance-method" class="signature"><strong>#patch?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_10%3F-instance-method" class="signature"><strong>#reserved_10?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_12%3F-instance-method" class="signature"><strong>#reserved_12?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_14%3F-instance-method" class="signature"><strong>#reserved_14?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_15%3F-instance-method" class="signature"><strong>#reserved_15?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_4%3F-instance-method" class="signature"><strong>#reserved_4?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_7%3F-instance-method" class="signature"><strong>#reserved_7?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_8%3F-instance-method" class="signature"><strong>#reserved_8?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#reserved_9%3F-instance-method" class="signature"><strong>#reserved_9?</strong></a> + + </li> + + <li class="entry-summary"> + <a href="#strong_encryption%3F-instance-method" class="signature"><strong>#strong_encryption?</strong></a> + + </li> + + </ul> + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="compression_option_1?-instance-method"> + <div class="signature"> + + def <strong>compression_option_1?</strong> + + <a class="method-permalink" href="#compression_option_1%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="compression_option_2?-instance-method"> + <div class="signature"> + + def <strong>compression_option_2?</strong> + + <a class="method-permalink" href="#compression_option_2%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="efs?-instance-method"> + <div class="signature"> + + def <strong>efs?</strong> + + <a class="method-permalink" href="#efs%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="encryption?-instance-method"> + <div class="signature"> + + def <strong>encryption?</strong> + + <a class="method-permalink" href="#encryption%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="footer?-instance-method"> + <div class="signature"> + + def <strong>footer?</strong> + + <a class="method-permalink" href="#footer%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="masked_values?-instance-method"> + <div class="signature"> + + def <strong>masked_values?</strong> + + <a class="method-permalink" href="#masked_values%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="patch?-instance-method"> + <div class="signature"> + + def <strong>patch?</strong> + + <a class="method-permalink" href="#patch%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_10?-instance-method"> + <div class="signature"> + + def <strong>reserved_10?</strong> + + <a class="method-permalink" href="#reserved_10%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_12?-instance-method"> + <div class="signature"> + + def <strong>reserved_12?</strong> + + <a class="method-permalink" href="#reserved_12%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_14?-instance-method"> + <div class="signature"> + + def <strong>reserved_14?</strong> + + <a class="method-permalink" href="#reserved_14%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_15?-instance-method"> + <div class="signature"> + + def <strong>reserved_15?</strong> + + <a class="method-permalink" href="#reserved_15%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_4?-instance-method"> + <div class="signature"> + + def <strong>reserved_4?</strong> + + <a class="method-permalink" href="#reserved_4%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_7?-instance-method"> + <div class="signature"> + + def <strong>reserved_7?</strong> + + <a class="method-permalink" href="#reserved_7%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_8?-instance-method"> + <div class="signature"> + + def <strong>reserved_8?</strong> + + <a class="method-permalink" href="#reserved_8%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="reserved_9?-instance-method"> + <div class="signature"> + + def <strong>reserved_9?</strong> + + <a class="method-permalink" href="#reserved_9%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="strong_encryption?-instance-method"> + <div class="signature"> + + def <strong>strong_encryption?</strong> + + <a class="method-permalink" href="#strong_encryption%3F-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + + + + +</div> + +</body> +</html> diff --git a/Zip/NoneCompressionHelper.html b/Zip/NoneCompressionHelper.html new file mode 100644 index 0000000..f508f52 --- /dev/null +++ b/Zip/NoneCompressionHelper.html @@ -0,0 +1,165 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::NoneCompressionHelper - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">module</span> Zip::NoneCompressionHelper + +</h1> + + + + + + <h2>Overview</h2> + + <p>Helper methods for reading and writing uncompressed data.</p> + + + + + + + + + + + + <h2>Direct including types</h2> + <ul class="other-types-list"> + + <li class="other-type"><a href="../Zip/Entry.html">Zip::Entry</a></li> + + <li class="other-type"><a href="../Zip/WriterEntry.html">Zip::WriterEntry</a></li> + + </ul> + + + + + <h2>Defined in:</h2> + + + + + + + + + + + + +<div class="methods-inherited"> + +</div> + + + + + + + +</div> + +</body> +</html> diff --git a/Zip/Source.html b/Zip/Source.html new file mode 100644 index 0000000..6c94cbc --- /dev/null +++ b/Zip/Source.html @@ -0,0 +1,335 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::Source - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">class</span> Zip::Source + +</h1> + + + <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/Source.html">Zip::Source</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul> + + + + + <h2>Overview</h2> + + <p>Base class for input source for <code><a href="../Zip/Archive.html">Archive</a></code> object.</p> + +<p>You should not need to instantiate this class directly; use +<code><a href="../Zip.html#read%28slice%3ABytes%2C%26cb%3AArchive-%3E%29%3AVoid-class-method">Zip.read</a>()</code> instead.</p> + + + + + + <h2>Included Modules</h2> + <ul class="other-types-list"> + + <li class="other-type">IO</li> + + </ul> + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + + <h2>Class Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#new%28io%3AIO%3A%3AFileDescriptor%7CMemoryIO%29-class-method" class="signature"><strong>.new</strong>(io : IO::FileDescriptor | MemoryIO)</a> + + <div class="summary"><p>Instantiate a new <code><a href="../Zip/Source.html">Source</a></code> from the given <code>IO::FileDescriptor</code> or <code>MemoryIO</code> object.</p></div> + + </li> + + </ul> + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#read%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#read</strong>(*args, **options, &block)</a> + + </li> + + <li class="entry-summary"> + <a href="#read%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#read</strong>(*args, **options)</a> + + </li> + + <li class="entry-summary"> + <a href="#write%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method" class="signature"><strong>#write</strong>(*args, **options, &block)</a> + + </li> + + <li class="entry-summary"> + <a href="#write%28%2Aargs%2C%2A%2Aoptions%29-instance-method" class="signature"><strong>#write</strong>(*args, **options)</a> + + </li> + + </ul> + + + + <h2>Macro Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#method_missing%28call%29-macro" class="signature"><strong>method_missing</strong>(call)</a> + + </li> + + </ul> + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + + + + + + + + +</div> + + + <h2>Class Method Detail</h2> + + <div class="entry-detail" id="new(io:IO::FileDescriptor|MemoryIO)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(io : IO::FileDescriptor | MemoryIO) + + <a class="method-permalink" href="#new%28io%3AIO%3A%3AFileDescriptor%7CMemoryIO%29-class-method">#</a> + </div> + + <div class="doc"><p>Instantiate a new <code><a href="../Zip/Source.html">Source</a></code> from the given <code>IO::FileDescriptor</code> or +<code>MemoryIO</code> object.</p> + +<p>You should not need to instantiate this class directly; use +<code><a href="../Zip.html#read%28slice%3ABytes%2C%26cb%3AArchive-%3E%29%3AVoid-class-method">Zip.read</a>()</code> instead.</p></div> + + <br/> + <div> + + </div> + </div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="read(*args,**options,&block)-instance-method"> + <div class="signature"> + + def <strong>read</strong>(*args, **options, &block) + + <a class="method-permalink" href="#read%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="read(*args,**options)-instance-method"> + <div class="signature"> + + def <strong>read</strong>(*args, **options) + + <a class="method-permalink" href="#read%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="write(*args,**options,&block)-instance-method"> + <div class="signature"> + + def <strong>write</strong>(*args, **options, &block) + + <a class="method-permalink" href="#write%28%2Aargs%2C%2A%2Aoptions%2C%26block%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="write(*args,**options)-instance-method"> + <div class="signature"> + + def <strong>write</strong>(*args, **options) + + <a class="method-permalink" href="#write%28%2Aargs%2C%2A%2Aoptions%29-instance-method">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + + + + <h2>Macro Detail</h2> + + <div class="entry-detail" id="method_missing(call)-macro"> + <div class="signature"> + + macro <strong>method_missing</strong>(call) + + <a class="method-permalink" href="#method_missing%28call%29-macro">#</a> + </div> + + <br/> + <div> + + </div> + </div> + + + +</div> + +</body> +</html> diff --git a/Zip/TimeHelper.html b/Zip/TimeHelper.html new file mode 100644 index 0000000..ed3ffad --- /dev/null +++ b/Zip/TimeHelper.html @@ -0,0 +1,165 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::TimeHelper - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">module</span> Zip::TimeHelper + +</h1> + + + + + + <h2>Overview</h2> + + <p>Helper methods for converting to and from <code>Time</code> objects.</p> + + + + + + + + + + + + <h2>Direct including types</h2> + <ul class="other-types-list"> + + <li class="other-type"><a href="../Zip/Entry.html">Zip::Entry</a></li> + + <li class="other-type"><a href="../Zip/WriterEntry.html">Zip::WriterEntry</a></li> + + </ul> + + + + + <h2>Defined in:</h2> + + + + + + + + + + + + +<div class="methods-inherited"> + +</div> + + + + + + + +</div> + +</body> +</html> diff --git a/Zip/Version.html b/Zip/Version.html new file mode 100644 index 0000000..a555534 --- /dev/null +++ b/Zip/Version.html @@ -0,0 +1,312 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::Version - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">class</span> Zip::Version + +</h1> + + + <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/Version.html">Zip::Version</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul> + + + + + <h2>Overview</h2> + + <p>Version identifier used to identify the version needed to extract a +given file and to indicate the format of the external file +attributes.</p> + +<p>See section 4.4.3.2 of APPNOTE.TXT for version details.</p> + + + + + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + <h2>Constant Summary</h2> + + <dl> + + <dt class="entry-const" id="DEFAULT"> + <strong>DEFAULT</strong> = <code><span class="k">new</span>(<span class="n">0</span>, <span class="n">0</span>)</code> + </dt> + + <dd class="entry-const-doc"> + <p>Default version made by, if unspecified.</p> + </dd> + + + <dt class="entry-const" id="NEEDED"> + <strong>NEEDED</strong> = <code><span class="k">new</span>(<span class="n">2</span>, <span class="n">0</span>)</code> + </dt> + + <dd class="entry-const-doc"> + <p>Version needed to extract this entry (4.4.3.2).</p> + </dd> + + + </dl> + + + + <h2>Class Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#new%28major%3AInt32%2Cminor%3AInt32%2Ccompat%3AInt32%3D%3Cspanclass%3D%22n%22%3E0%3C%2Fspan%3E%29-class-method" class="signature"><strong>.new</strong>(major : Int32, minor : Int32, compat : Int32 = <span class="n">0</span>)</a> + + <div class="summary"><p>Create a version identifier from a major number, minor number, and optional compatability number.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#new%28v%3AUInt16%29-class-method" class="signature"><strong>.new</strong>(v : UInt16)</a> + + <div class="summary"><p>Create a version identifier from a major number, minor number, and optional compatability number.</p></div> + + </li> + + </ul> + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#to_io%28io%29-instance-method" class="signature"><strong>#to_io</strong>(io)</a> + + <div class="summary"><p>Write version as 16-bit, little-endian integer and return number of bytes written.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#to_s%28io%29-instance-method" class="signature"><strong>#to_s</strong>(io)</a> + + <div class="summary"><p>Write version as string.</p></div> + + </li> + + </ul> + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + +</div> + + + <h2>Class Method Detail</h2> + + <div class="entry-detail" id="new(major:Int32,minor:Int32,compat:Int32=<spanclass="n">0</span>)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(major : Int32, minor : Int32, compat : Int32 = <span class="n">0</span>) + + <a class="method-permalink" href="#new%28major%3AInt32%2Cminor%3AInt32%2Ccompat%3AInt32%3D%3Cspanclass%3D%22n%22%3E0%3C%2Fspan%3E%29-class-method">#</a> + </div> + + <div class="doc"><p>Create a version identifier from a major number, minor number, and +optional compatability number.</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="new(v:UInt16)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(v : UInt16) + + <a class="method-permalink" href="#new%28v%3AUInt16%29-class-method">#</a> + </div> + + <div class="doc"><p>Create a version identifier from a major number, minor number, and +optional compatability number.</p></div> + + <br/> + <div> + + </div> + </div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="to_io(io)-instance-method"> + <div class="signature"> + + def <strong>to_io</strong>(io) + + <a class="method-permalink" href="#to_io%28io%29-instance-method">#</a> + </div> + + <div class="doc"><p>Write version as 16-bit, little-endian integer and return number +of bytes written.</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="to_s(io)-instance-method"> + <div class="signature"> + + def <strong>to_s</strong>(io) + + <a class="method-permalink" href="#to_s%28io%29-instance-method">#</a> + </div> + + <div class="doc"><p>Write version as string.</p></div> + + <br/> + <div> + + </div> + </div> + + + + + +</div> + +</body> +</html> diff --git a/Zip/Writer.html b/Zip/Writer.html new file mode 100644 index 0000000..c28c13e --- /dev/null +++ b/Zip/Writer.html @@ -0,0 +1,389 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::Writer - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">class</span> Zip::Writer + +</h1> + + + <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/Writer.html">Zip::Writer</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul> + + + + + + + + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + + <h2>Class Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#new%28io%3AIO%2Cpos%3AUInt32%3D%3Cspanclass%3D%22n%22%3E0%3C%2Fspan%3E%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%2Cversion%3AVersion%3D%3Cspanclass%3D%22t%22%3EVersion%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFAULT%3C%2Fspan%3E%29-class-method" class="signature"><strong>.new</strong>(io : IO, pos : UInt32 = <span class="n">0</span>, comment : String = <span class="s">""</span>, version : Version = <span class="t">Version</span><span class="t">::</span><span class="t">DEFAULT</span>)</a> + + <div class="summary"><p>Create a new <code><a href="../Zip/Writer.html">Writer</a></code> object.</p></div> + + </li> + + </ul> + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#add%28path%3AString%2Cio%3AIO%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method" class="signature"><strong>#add</strong>(path : String, io : IO, method : CompressionMethod = <span class="t">CompressionMethod</span><span class="t">::</span><span class="t">DEFLATE</span>, time : Time = <span class="t">Time</span>.now, comment : String = <span class="s">""</span>) : UInt32</a> + + <div class="summary"><p>Read data from <code>IO</code> <em>io</em>, write it to <em>path</em> in archive, then return the number of bytes written.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#add%28path%3AString%2Cdata%3AString%7CBytes%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method" class="signature"><strong>#add</strong>(path : String, data : String | Bytes, method : CompressionMethod = <span class="t">CompressionMethod</span><span class="t">::</span><span class="t">DEFLATE</span>, time : Time = <span class="t">Time</span>.now, comment : String = <span class="s">""</span>) : UInt32</a> + + <div class="summary"><p>Write <em>data</em> to <em>path</em> in archive and return number of bytes written.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#add_file%28path%3AString%2Cfile_path%3AString%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method" class="signature"><strong>#add_file</strong>(path : String, file_path : String, method : CompressionMethod = <span class="t">CompressionMethod</span><span class="t">::</span><span class="t">DEFLATE</span>, time : Time = <span class="t">Time</span>.now, comment : String = <span class="s">""</span>) : UInt32</a> + + <div class="summary"><p>Add local file <em>file_path</em> to archive as <em>path</em> and return number of bytes written.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#bytes_written%3AUInt32-instance-method" class="signature"><strong>#bytes_written</strong> : UInt32</a> + + <div class="summary"><p>Return the total number of bytes written so far.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#close-instance-method" class="signature"><strong>#close</strong></a> + + <div class="summary"><p>Close this writer and return the total number of bytes written.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#closed%3F%3ABool-instance-method" class="signature"><strong>#closed?</strong> : Bool</a> + + <div class="summary"><p>Is this <code><a href="../Zip/Writer.html">Writer</a></code> closed? </p></div> + + </li> + + </ul> + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + +</div> + + + <h2>Class Method Detail</h2> + + <div class="entry-detail" id="new(io:IO,pos:UInt32=<spanclass="n">0</span>,comment:String=<spanclass="s">&quot;&quot;</span>,version:Version=<spanclass="t">Version</span><spanclass="t">::</span><spanclass="t">DEFAULT</span>)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(io : IO, pos : UInt32 = <span class="n">0</span>, comment : String = <span class="s">""</span>, version : <a href="../Zip/Version.html">Version</a> = <span class="t">Version</span><span class="t">::</span><span class="t">DEFAULT</span>) + + <a class="method-permalink" href="#new%28io%3AIO%2Cpos%3AUInt32%3D%3Cspanclass%3D%22n%22%3E0%3C%2Fspan%3E%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%2Cversion%3AVersion%3D%3Cspanclass%3D%22t%22%3EVersion%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFAULT%3C%2Fspan%3E%29-class-method">#</a> + </div> + + <div class="doc"><p>Create a new <code><a href="../Zip/Writer.html">Writer</a></code> object.</p> + +<p>You shouldn't need to instantiate this class directly; use +<code><a href="../Zip.html#write%28io%3AIO%2Cpos%3AUInt32%3D%3Cspanclass%3D%22n%22%3E0_u32%3C%2Fspan%3E%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%2Cversion%3AVersion%3D%3Cspanclass%3D%22t%22%3EVersion%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFAULT%3C%2Fspan%3E%2C%26cb%3AWriter-%3E%29%3AUInt32-class-method">Zip.write</a>()</code> instead.</p></div> + + <br/> + <div> + + </div> + </div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="add(path:String,io:IO,method:CompressionMethod=<spanclass="t">CompressionMethod</span><spanclass="t">::</span><spanclass="t">DEFLATE</span>,time:Time=<spanclass="t">Time</span>.now,comment:String=<spanclass="s">&quot;&quot;</span>):UInt32-instance-method"> + <div class="signature"> + + def <strong>add</strong>(path : String, io : IO, method : <a href="../Zip/CompressionMethod.html">CompressionMethod</a> = <span class="t">CompressionMethod</span><span class="t">::</span><span class="t">DEFLATE</span>, time : Time = <span class="t">Time</span>.now, comment : String = <span class="s">""</span>) : UInt32 + + <a class="method-permalink" href="#add%28path%3AString%2Cio%3AIO%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">#</a> + </div> + + <div class="doc"><p>Read data from <code>IO</code> <em>io</em>, write it to <em>path</em> in archive, then +return the number of bytes written.</p> + +<p>Example:</p> + +<p># create IO from "/path/to/bar.txt" +File.open("/path/to/bar.txt, "rb") do |io| +# write to "foo.zip" +Zip.write("foo.zip") do |zip| +# add "bar.txt" with contents of given IO +zip.add("bar.txt", io) +end +end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="add(path:String,data:String|Bytes,method:CompressionMethod=<spanclass="t">CompressionMethod</span><spanclass="t">::</span><spanclass="t">DEFLATE</span>,time:Time=<spanclass="t">Time</span>.now,comment:String=<spanclass="s">&quot;&quot;</span>):UInt32-instance-method"> + <div class="signature"> + + def <strong>add</strong>(path : String, data : String | Bytes, method : <a href="../Zip/CompressionMethod.html">CompressionMethod</a> = <span class="t">CompressionMethod</span><span class="t">::</span><span class="t">DEFLATE</span>, time : Time = <span class="t">Time</span>.now, comment : String = <span class="s">""</span>) : UInt32 + + <a class="method-permalink" href="#add%28path%3AString%2Cdata%3AString%7CBytes%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">#</a> + </div> + + <div class="doc"><p>Write <em>data</em> to <em>path</em> in archive and return number of bytes +written.</p> + +<p>Example:</p> + +<p># write to "foo.zip" +Zip.write("foo.zip") do |zip| +# add "bar.txt" with contents "hello!" +zip.add("bar.txt", "hello!") +end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="add_file(path:String,file_path:String,method:CompressionMethod=<spanclass="t">CompressionMethod</span><spanclass="t">::</span><spanclass="t">DEFLATE</span>,time:Time=<spanclass="t">Time</span>.now,comment:String=<spanclass="s">&quot;&quot;</span>):UInt32-instance-method"> + <div class="signature"> + + def <strong>add_file</strong>(path : String, file_path : String, method : <a href="../Zip/CompressionMethod.html">CompressionMethod</a> = <span class="t">CompressionMethod</span><span class="t">::</span><span class="t">DEFLATE</span>, time : Time = <span class="t">Time</span>.now, comment : String = <span class="s">""</span>) : UInt32 + + <a class="method-permalink" href="#add_file%28path%3AString%2Cfile_path%3AString%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">#</a> + </div> + + <div class="doc"><p>Add local file <em>file_path</em> to archive as <em>path</em> and return number +of bytes written.</p> + +<p>Example:</p> + +<p># write to "foo.zip" +Zip.write("foo.zip") do |zip| +# add local file "/path/to/bar.txt" as "bar.txt" +zip.add_file("bar.txt", "/path/to/bar.txt") +end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="bytes_written:UInt32-instance-method"> + <div class="signature"> + + def <strong>bytes_written</strong> : UInt32 + + <a class="method-permalink" href="#bytes_written%3AUInt32-instance-method">#</a> + </div> + + <div class="doc"><p>Return the total number of bytes written so far.</p> + +<p>Example:</p> + +<p>Zip.write("foo.zip") do |zip| +# add "bar.txt" +zip.add_file("bar.txt", "/path/to/bar.txt")</p> + +<pre><code><span class="c"># print number of bytes written so far</span> +puts <span class="s">"bytes written so far: </span><span class="i">#{</span></span>zip.bytes_written<span class="s"><span class="i">}</span>"</span></code></pre> + +<p>end</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="close-instance-method"> + <div class="signature"> + + def <strong>close</strong> + + <a class="method-permalink" href="#close-instance-method">#</a> + </div> + + <div class="doc"><p>Close this writer and return the total number of bytes written.</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="closed?:Bool-instance-method"> + <div class="signature"> + + def <strong>closed?</strong> : Bool + + <a class="method-permalink" href="#closed%3F%3ABool-instance-method">#</a> + </div> + + <div class="doc"><p>Is this <code><a href="../Zip/Writer.html">Writer</a></code> closed?</p></div> + + <br/> + <div> + + </div> + </div> + + + + + +</div> + +</body> +</html> diff --git a/Zip/WriterEntry.html b/Zip/WriterEntry.html new file mode 100644 index 0000000..843b04b --- /dev/null +++ b/Zip/WriterEntry.html @@ -0,0 +1,319 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <meta id="repository-name" content="github.com/pablotron/zip-crystal"> + <link href="../css/style.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript" src="../js/doc.js"></script> + <title>Zip::WriterEntry - github.com/pablotron/zip-crystal</title> +</head> +<body> + +<div id="types-list"> + <div id="search-box"> + <input type="search" id="search-input" placeholder="Search..."> + </div> + + <ul> + <li><a href="../index.html">README</a></li> + </ul> + + <ul> + + <li class="parent open current" data-id="github.com/pablotron/zip-crystal/Zip" data-name="zip"> + <a href="../Zip.html">Zip</a> + + <ul> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Archive" data-name="zip::archive"> + <a href="../Zip/Archive.html">Archive</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/CompressionMethod" data-name="zip::compressionmethod"> + <a href="../Zip/CompressionMethod.html">CompressionMethod</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/DeflateCompressionHelper" data-name="zip::deflatecompressionhelper"> + <a href="../Zip/DeflateCompressionHelper.html">DeflateCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Entry" data-name="zip::entry"> + <a href="../Zip/Entry.html">Entry</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Error" data-name="zip::error"> + <a href="../Zip/Error.html">Error</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Extra" data-name="zip::extra"> + <a href="../Zip/Extra.html">Extra</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/GeneralFlags" data-name="zip::generalflags"> + <a href="../Zip/GeneralFlags.html">GeneralFlags</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/NoneCompressionHelper" data-name="zip::nonecompressionhelper"> + <a href="../Zip/NoneCompressionHelper.html">NoneCompressionHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Source" data-name="zip::source"> + <a href="../Zip/Source.html">Source</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/TimeHelper" data-name="zip::timehelper"> + <a href="../Zip/TimeHelper.html">TimeHelper</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Version" data-name="zip::version"> + <a href="../Zip/Version.html">Version</a> + + </li> + + <li class=" " data-id="github.com/pablotron/zip-crystal/Zip/Writer" data-name="zip::writer"> + <a href="../Zip/Writer.html">Writer</a> + + </li> + + <li class=" current" data-id="github.com/pablotron/zip-crystal/Zip/WriterEntry" data-name="zip::writerentry"> + <a href="../Zip/WriterEntry.html">WriterEntry</a> + + </li> + +</ul> + + + </li> + +</ul> + +</div> + +<div id="main-content"> +<h1 class="type-name"> + + <span class="kind">class</span> Zip::WriterEntry + +</h1> + + + <ul class="superclass-hierarchy"><li class="superclass"><a href="../Zip/WriterEntry.html">Zip::WriterEntry</a></li><li class="superclass">Reference</li><li class="superclass">Object</li></ul> + + + + + <h2>Overview</h2> + + <p>Internal class used to store files for <code><a href="../Zip/Writer.html">Writer</a></code> instance.</p> + +<p>You should not need to instantiate this class directly; it is called +automatically by <code><a href="../Zip/Writer.html#add%28path%3AString%2Cio%3AIO%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">Writer#add</a></code> and <code><a href="../Zip/Writer.html#add_file%28path%3AString%2Cfile_path%3AString%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">Writer#add_file</a></code>.</p> + + + + + + <h2>Included Modules</h2> + <ul class="other-types-list"> + + <li class="other-type"><a href="../Zip/DeflateCompressionHelper.html">Zip::DeflateCompressionHelper</a></li> + + <li class="other-type"><a href="../Zip/NoneCompressionHelper.html">Zip::NoneCompressionHelper</a></li> + + <li class="other-type"><a href="../Zip/TimeHelper.html">Zip::TimeHelper</a></li> + + </ul> + + + + + + + + + + + <h2>Defined in:</h2> + + + + + + <h2>Constant Summary</h2> + + <dl> + + <dt class="entry-const" id="GENERAL_FLAGS"> + <strong>GENERAL_FLAGS</strong> = <code><span class="t">GeneralFlags</span>.flags(<span class="t">FOOTER</span>, <span class="t">EFS</span>)</code> + </dt> + + <dd class="entry-const-doc"> + <p>Default flags for local and central header.</p> + </dd> + + + </dl> + + + + <h2>Class Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#new%28pos%3AUInt32%2Cpath%3AString%2Cio%3AIO%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29-class-method" class="signature"><strong>.new</strong>(pos : UInt32, path : String, io : IO, method : CompressionMethod = <span class="t">CompressionMethod</span><span class="t">::</span><span class="t">DEFLATE</span>, time : Time = <span class="t">Time</span>.now, comment : String = <span class="s">""</span>)</a> + + <div class="summary"><p>Create a new WriterEntry instance.</p></div> + + </li> + + </ul> + + + + <h2>Instance Method Summary</h2> + <ul class="list-summary"> + + <li class="entry-summary"> + <a href="#to_s%28dst_io%29%3AUInt32-instance-method" class="signature"><strong>#to_s</strong>(dst_io) : UInt32</a> + + <div class="summary"><p>Write local file entry to IO and return the number of bytes written.</p></div> + + </li> + + <li class="entry-summary"> + <a href="#write_central%28io%3AIO%2Cversion%3AVersion%3D%3Cspanclass%3D%22t%22%3EVersion%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFAULT%3C%2Fspan%3E%29%3AUInt32-instance-method" class="signature"><strong>#write_central</strong>(io : IO, version : Version = <span class="t">Version</span><span class="t">::</span><span class="t">DEFAULT</span>) : UInt32</a> + + <div class="summary"><p>Write central directory data for this <code><a href="../Zip/WriterEntry.html">WriterEntry</a></code> and return the number of bytes written.</p></div> + + </li> + + </ul> + + + + + +<div class="methods-inherited"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +</div> + + + <h2>Class Method Detail</h2> + + <div class="entry-detail" id="new(pos:UInt32,path:String,io:IO,method:CompressionMethod=<spanclass="t">CompressionMethod</span><spanclass="t">::</span><spanclass="t">DEFLATE</span>,time:Time=<spanclass="t">Time</span>.now,comment:String=<spanclass="s">&quot;&quot;</span>)-class-method"> + <div class="signature"> + + def self.<strong>new</strong>(pos : UInt32, path : String, io : IO, method : <a href="../Zip/CompressionMethod.html">CompressionMethod</a> = <span class="t">CompressionMethod</span><span class="t">::</span><span class="t">DEFLATE</span>, time : Time = <span class="t">Time</span>.now, comment : String = <span class="s">""</span>) + + <a class="method-permalink" href="#new%28pos%3AUInt32%2Cpath%3AString%2Cio%3AIO%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29-class-method">#</a> + </div> + + <div class="doc"><p>Create a new WriterEntry instance.</p> + +<p>You should not need to call this method directly; it is called +automatically by <code><a href="../Zip/Writer.html#add%28path%3AString%2Cio%3AIO%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">Writer#add</a></code> and <code><a href="../Zip/Writer.html#add_file%28path%3AString%2Cfile_path%3AString%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">Writer#add_file</a></code>.</p></div> + + <br/> + <div> + + </div> + </div> + + + + + <h2>Instance Method Detail</h2> + + <div class="entry-detail" id="to_s(dst_io):UInt32-instance-method"> + <div class="signature"> + + def <strong>to_s</strong>(dst_io) : UInt32 + + <a class="method-permalink" href="#to_s%28dst_io%29%3AUInt32-instance-method">#</a> + </div> + + <div class="doc"><p>Write local file entry to IO and return the number of bytes +written.</p> + +<p>You should not need to call this method directly; it is called +automatically by <code><a href="../Zip/Writer.html#add%28path%3AString%2Cio%3AIO%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">Writer#add</a></code> and <code><a href="../Zip/Writer.html#add_file%28path%3AString%2Cfile_path%3AString%2Cmethod%3ACompressionMethod%3D%3Cspanclass%3D%22t%22%3ECompressionMethod%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFLATE%3C%2Fspan%3E%2Ctime%3ATime%3D%3Cspanclass%3D%22t%22%3ETime%3C%2Fspan%3E.now%2Ccomment%3AString%3D%3Cspanclass%3D%22s%22%3E%26quot%3B%26quot%3B%3C%2Fspan%3E%29%3AUInt32-instance-method">Writer#add_file</a></code>.</p></div> + + <br/> + <div> + + </div> + </div> + + <div class="entry-detail" id="write_central(io:IO,version:Version=<spanclass="t">Version</span><spanclass="t">::</span><spanclass="t">DEFAULT</span>):UInt32-instance-method"> + <div class="signature"> + + def <strong>write_central</strong>(io : IO, version : <a href="../Zip/Version.html">Version</a> = <span class="t">Version</span><span class="t">::</span><span class="t">DEFAULT</span>) : UInt32 + + <a class="method-permalink" href="#write_central%28io%3AIO%2Cversion%3AVersion%3D%3Cspanclass%3D%22t%22%3EVersion%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3E%3A%3A%3C%2Fspan%3E%3Cspanclass%3D%22t%22%3EDEFAULT%3C%2Fspan%3E%29%3AUInt32-instance-method">#</a> + </div> + + <div class="doc"><p>Write central directory data for this <code><a href="../Zip/WriterEntry.html">WriterEntry</a></code> and return the +number of bytes written.</p> + +<p>You should not need to call this method directly; it is called +automatically by <code><a href="../Zip/Writer.html#close-instance-method">Writer#close</a></code>.</p></div> + + <br/> + <div> + + </div> + </div> + + + + + +</div> + +</body> +</html> |