mirror of
https://github.com/tsolomko/SWCompression.git
synced 2026-06-23 14:56:41 +00:00
482 lines
24 KiB
HTML
482 lines
24 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<title>Enums Reference</title>
|
||
<link rel="stylesheet" type="text/css" href="css/jazzy.css" />
|
||
<link rel="stylesheet" type="text/css" href="css/highlight.css" />
|
||
<meta charset="utf-8">
|
||
<script src="js/jquery.min.js" defer></script>
|
||
<script src="js/jazzy.js" defer></script>
|
||
|
||
</head>
|
||
<body>
|
||
|
||
|
||
<a title="Enums Reference"></a>
|
||
|
||
<header class="header">
|
||
<p class="header-col header-col--primary">
|
||
<a class="header-link" href="index.html">
|
||
SWCompression Docs
|
||
</a>
|
||
(100% documented)
|
||
</p>
|
||
|
||
<p class="header-col header-col--secondary">
|
||
<a class="header-link" href="https://github.com/tsolomko/SWCompression">
|
||
<img class="header-icon" src="img/gh.png"/>
|
||
View on GitHub
|
||
</a>
|
||
</p>
|
||
|
||
</header>
|
||
|
||
<p class="breadcrumbs">
|
||
<a class="breadcrumb" href="index.html">SWCompression Reference</a>
|
||
<img class="carat" src="img/carat.png" />
|
||
Enums Reference
|
||
</p>
|
||
|
||
<div class="content-wrapper">
|
||
<nav class="navigation">
|
||
<ul class="nav-groups">
|
||
<li class="nav-group-name">
|
||
<a class="nav-group-name-link" href="Classes.html">Classes</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Classes/BZip2.html">BZip2</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Classes/Deflate.html">Deflate</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Classes/GzipArchive.html">GzipArchive</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Classes/LZMA.html">LZMA</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Classes/LZMA2.html">LZMA2</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Classes/XZArchive.html">XZArchive</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Classes/ZlibArchive.html">ZlibArchive</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a class="nav-group-name-link" href="Enums.html">Enums</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Enums/BZip2Error.html">BZip2Error</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Enums/DeflateError.html">DeflateError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Enums/GzipError.html">GzipError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Enums/LZMA2Error.html">LZMA2Error</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Enums/LZMAError.html">LZMAError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Enums/XZError.html">XZError</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Enums/ZlibError.html">ZlibError</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a class="nav-group-name-link" href="Protocols.html">Protocols</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Protocols/Archive.html">Archive</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Protocols/DecompressionAlgorithm.html">DecompressionAlgorithm</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
<li class="nav-group-name">
|
||
<a class="nav-group-name-link" href="Structs.html">Structs</a>
|
||
<ul class="nav-group-tasks">
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Structs/GzipHeader.html">GzipHeader</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Structs/GzipHeader/CompressionMethod.html">– CompressionMethod</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Structs/GzipHeader/FileSystemType.html">– FileSystemType</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Structs/ZlibHeader.html">ZlibHeader</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Structs/ZlibHeader/CompressionMethod.html">– CompressionMethod</a>
|
||
</li>
|
||
<li class="nav-group-task">
|
||
<a class="nav-group-task-link" href="Structs/ZlibHeader/CompressionLevel.html">– CompressionLevel</a>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
<article class="main-content">
|
||
|
||
<section class="section">
|
||
<div class="section-content">
|
||
<h1>Enums</h1>
|
||
<p>The following enums are available globally.</p>
|
||
|
||
</div>
|
||
</section>
|
||
|
||
<section class="section">
|
||
<div class="section-content">
|
||
<div class="task-group">
|
||
<ul class="item-container">
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:O13SWCompression10LZMA2Error"></a>
|
||
<a name="//apple_ref/swift/Enum/LZMA2Error" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:O13SWCompression10LZMA2Error">LZMA2Error</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Error happened during LZMA2 decompression.
|
||
It may indicate that either the data is damaged or it might not be compressed with LZMA2 at all.</p>
|
||
|
||
<ul>
|
||
<li><code>WrongProperties</code>: reserved bits of LZMA2 properties byte weren’t zero.</li>
|
||
<li><code>WrongDictionarySize</code>: dictionary size was greater than 2^32.</li>
|
||
<li><code>WrongControlByte</code>: unsupported value of LZMA2 packet’s control byte.</li>
|
||
<li><code>WrongReset</code>: unsupported ‘reset’ value of LZMA2 packet’s.</li>
|
||
<li><code>WrongSizes</code>: size of compressed or decompressed data wasn’t the same as specified in LZMA2 packet.</li>
|
||
</ul>
|
||
|
||
<a href="Enums/LZMA2Error.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">LZMA2Error</span><span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="slightly-smaller">
|
||
<a href="https://github.com/tsolomko/SWCompression/tree/v2.0.0/Sources/LZMA2.swift#L21-L35">Show on GitHub</a>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<div class="task-group">
|
||
<ul class="item-container">
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:O13SWCompression9GzipError"></a>
|
||
<a name="//apple_ref/swift/Enum/GzipError" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:O13SWCompression9GzipError">GzipError</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Error happened during unarchiving gzip archive.
|
||
It may indicate that either the data is damaged or it might not be gzip archive at all.</p>
|
||
|
||
<ul>
|
||
<li><code>WrongMagic</code>: first two bytes of archive were not 31 and 139.</li>
|
||
<li><code>WrongCompressionMethod</code>: unsupported compression method (not 8 aka Deflate).</li>
|
||
<li><code>WrongFlags</code>: unsupported flags (reserved flags weren’t 0).</li>
|
||
<li><code>WrongHeaderCRC</code>: computed Cyclic Redundancy Check of archive’s header
|
||
didn’t match the archive’s value.</li>
|
||
<li><code>WrongCRC</code>: computed Cyclic Redundancy Check of uncompressed data didn’t match the archive’s value.
|
||
Associated value contains already decompressed data.</li>
|
||
<li><code>WrongISize</code>: size of uncompressed data modulo 2^32 didn’t match the archive’s value.</li>
|
||
</ul>
|
||
|
||
<a href="Enums/GzipError.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">GzipError</span><span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="slightly-smaller">
|
||
<a href="https://github.com/tsolomko/SWCompression/tree/v2.0.0/Sources/GzipArchive.swift#L24-L40">Show on GitHub</a>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<div class="task-group">
|
||
<ul class="item-container">
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:O13SWCompression9LZMAError"></a>
|
||
<a name="//apple_ref/swift/Enum/LZMAError" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:O13SWCompression9LZMAError">LZMAError</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Error happened during LZMA decompression.
|
||
It may indicate that either the data is damaged or it might not be compressed with LZMA at all.</p>
|
||
|
||
<ul>
|
||
<li><code>WrongProperties</code>: unsupported LZMA properties (greater than 225).</li>
|
||
<li><code>RangeDecoderInitError</code>: unable to initialize RangedDecoder.</li>
|
||
<li><code>ExceededUncompressedSize</code>: the number of uncompressed bytes reached amount specified by archive
|
||
while decoding wasn’t finished.</li>
|
||
<li><code>WindowIsEmpty</code>: unable to repeat bytes because there is nothing to repeat.</li>
|
||
<li><code>RangeDecoderFinishError</code>: range decoder was in a bad state when finish marker was reached.</li>
|
||
<li><code>RepeatWillExceed</code>: unable to repeat bytes because the number of bytes to repeat is greater
|
||
than the amount bytes that is left to decode.</li>
|
||
<li><code>NotEnoughToRepeat</code>: unable to repeat bytes because the amount of already decoded bytes is smaller
|
||
than the repeat length.</li>
|
||
</ul>
|
||
|
||
<a href="Enums/LZMAError.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">LZMAError</span><span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="slightly-smaller">
|
||
<a href="https://github.com/tsolomko/SWCompression/tree/v2.0.0/Sources/LZMA.swift#L26-L41">Show on GitHub</a>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<div class="task-group">
|
||
<ul class="item-container">
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:O13SWCompression9ZlibError"></a>
|
||
<a name="//apple_ref/swift/Enum/ZlibError" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:O13SWCompression9ZlibError">ZlibError</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Error happened during unarchiving Zlib archive.
|
||
It may indicate that either the data is damaged or it might not be Zlib archive at all.</p>
|
||
|
||
<ul>
|
||
<li><code>WrongCompressionMethod</code>: unsupported compression method (not 8).</li>
|
||
<li><code>WrongCompressionInfo</code>: unsupported compression info (greater than 7).</li>
|
||
<li><code>WrongFcheck</code>: first two bytes were inconsistent with each other.</li>
|
||
<li><code>WrongCompressionLevel</code>: unsupported compression level (not 0, 1, 2 or 3).</li>
|
||
<li><code>WrongAdler32</code>: computed Adler-32 checksum of uncompressed data didn’t match the archive’s value.
|
||
Associated value contains already decompressed data.</li>
|
||
</ul>
|
||
|
||
<a href="Enums/ZlibError.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">ZlibError</span><span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="slightly-smaller">
|
||
<a href="https://github.com/tsolomko/SWCompression/tree/v2.0.0/Sources/ZlibArchive.swift#L22-L36">Show on GitHub</a>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<div class="task-group">
|
||
<ul class="item-container">
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:O13SWCompression12DeflateError"></a>
|
||
<a name="//apple_ref/swift/Enum/DeflateError" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:O13SWCompression12DeflateError">DeflateError</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Error happened during deflate decompression.
|
||
It may indicate that either the data is damaged or it might not be compressed with DEFLATE at all.</p>
|
||
|
||
<ul>
|
||
<li><code>WrongUncompressedBlockLengths</code>: <code>length</code> and <code>nlength</code> bytes of uncompressed block were not compatible.</li>
|
||
<li><code>WrongBlockType</code>: unsupported block type (not 0, 1 or 2).</li>
|
||
<li><code>WrongSymbol</code>: unsupported Huffman tree’s symbol.</li>
|
||
<li><code>SymbolNotFound</code>: symbol from input data was not found in Huffman tree.</li>
|
||
</ul>
|
||
|
||
<a href="Enums/DeflateError.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">DeflateError</span><span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="slightly-smaller">
|
||
<a href="https://github.com/tsolomko/SWCompression/tree/v2.0.0/Sources/Deflate.swift#L20-L29">Show on GitHub</a>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<div class="task-group">
|
||
<ul class="item-container">
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:O13SWCompression10BZip2Error"></a>
|
||
<a name="//apple_ref/swift/Enum/BZip2Error" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:O13SWCompression10BZip2Error">BZip2Error</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Error happened during bzip2 decompression.
|
||
It may indicate that either the data is damaged or it might not be compressed with BZip2 at all.</p>
|
||
|
||
<ul>
|
||
<li><code>WrongMagic</code>: unsupported magic number (not 0x425a).</li>
|
||
<li><code>WrongCompressionMethod</code>: unsupported compression method (not type ‘h’).</li>
|
||
<li><code>WrongBlockSize</code>: unsupported block size (not ‘0’ — ‘9’).</li>
|
||
<li><code>WrongBlockType</code>: unsupported block type (not ‘pi’ or ‘sqrt(pi)’).</li>
|
||
<li><code>RandomizedBlock</code>: block is randomized; this is not supported.</li>
|
||
<li><code>WrongHuffmanGroups</code>: unsupported number of Huffman tables/groups (not between 2 and 6).</li>
|
||
<li><code>WrongSelector</code>: unsupported selector (greater than total number of Huffman groups).</li>
|
||
<li><code>WrongHuffmanLengthCode</code>: unsupported code for Huffman length (not between 0 and 20).</li>
|
||
<li><code>SymbolNotFound</code>: symbol from input data was not found in Huffman tree.</li>
|
||
</ul>
|
||
|
||
<a href="Enums/BZip2Error.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">BZip2Error</span><span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="slightly-smaller">
|
||
<a href="https://github.com/tsolomko/SWCompression/tree/v2.0.0/Sources/BZip2.swift#L25-L44">Show on GitHub</a>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
<div class="task-group">
|
||
<ul class="item-container">
|
||
<li class="item">
|
||
<div>
|
||
<code>
|
||
<a name="/s:O13SWCompression7XZError"></a>
|
||
<a name="//apple_ref/swift/Enum/XZError" class="dashAnchor"></a>
|
||
<a class="token" href="#/s:O13SWCompression7XZError">XZError</a>
|
||
</code>
|
||
</div>
|
||
<div class="height-container">
|
||
<div class="pointer-container"></div>
|
||
<section class="section">
|
||
<div class="pointer"></div>
|
||
<div class="abstract">
|
||
<p>Error happened during unarchiving xz archive.
|
||
It may indicate that either the data is damaged or it might not be xz archive at all.</p>
|
||
|
||
<ul>
|
||
<li><code>WrongMagic</code>: ‘magic’ bytes in archive’s header or footer weren’t equal to predefined value.</li>
|
||
<li><code>WrongArchiveInfo</code>: incorrect value of one of archive’s special field (in block, index, header or footer).</li>
|
||
<li><code>FieldReservedValue</code>: value of one of archive’s special field
|
||
(in block, index, header or footer) had reserved value.</li>
|
||
<li><code>WrongInfoCRC</code>: incorrect value of one of archive’s special field (in block, index, header or footer).</li>
|
||
<li><code>WrongFilterID</code>: unsupported value of filter ID (not LZMA2’s 0x21).</li>
|
||
<li><code>CheckTypeSHA256</code>: checksum’s type was SHA-256.</li>
|
||
<li><code>WrongDataSize</code>: size of compressed or decompressed data wasn’t the same as specified in block.</li>
|
||
<li><code>WrongCheck</code>: computed checksum of uncompressed data didn’t match the archive’s value.
|
||
Associated value contains already decompressed data.</li>
|
||
<li><code>WrongPadding</code>: unsupported padding of one of structures in the archive.</li>
|
||
<li><code>MultiByteIntegerError</code>: error happened during reading of one of so called ‘multi-byte’ numbers.</li>
|
||
</ul>
|
||
|
||
<a href="Enums/XZError.html" class="slightly-smaller">See more</a>
|
||
</div>
|
||
<div class="declaration">
|
||
<h4>Declaration</h4>
|
||
<div class="language">
|
||
<p class="aside-title">Swift</p>
|
||
<pre class="highlight"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">XZError</span><span class="p">:</span> <span class="kt">Error</span></code></pre>
|
||
|
||
</div>
|
||
</div>
|
||
<div class="slightly-smaller">
|
||
<a href="https://github.com/tsolomko/SWCompression/tree/v2.0.0/Sources/XZArchive.swift#L28-L55">Show on GitHub</a>
|
||
</div>
|
||
</section>
|
||
</div>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
</article>
|
||
</div>
|
||
<section class="footer">
|
||
<p>© 2016 Timofey Solomko</p>
|
||
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
||
</section>
|
||
</body>
|
||
</div>
|
||
</html>
|