/usr/share/doc/libghc-missingh-doc/html/System-FileArchive-GZip.html is in libghc-missingh-doc 1.4.0.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>System.FileArchive.GZip</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_System-FileArchive-GZip.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-FileArchive-GZip.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">MissingH-1.4.0.1: Large utility library</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>Copyright (C) 2004-2011 John Goerzen</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>John Goerzen <jgoerzen@complete.org></td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">System.FileArchive.GZip</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">GZip Files</a></li><li><a href="#g:2">Types</a></li><li><a href="#g:3">Whole-File Processing</a></li><li><a href="#g:4">Section Processing</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>GZip file decompression</p><p>Copyright (c) 2004 John Goerzen, jgoerzen@complete.org</p><p>The GZip format is described in RFC1952.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Header">Header</a> = <a href="#v:Header">Header</a> {<ul class="subs"><li><a href="#v:method">method</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:flags">flags</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:extra">extra</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li><a href="#v:filename">filename</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li><a href="#v:comment">comment</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li><li><a href="#v:mtime">mtime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word32">Word32</a></li><li><a href="#v:xfl">xfl</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:os">os</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:Section">Section</a> = (<a href="System-FileArchive-GZip.html#t:Header">Header</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, <a href="System-FileArchive-GZip.html#t:Footer">Footer</a>)</li><li class="src short"><span class="keyword">data</span> <a href="#t:GZipError">GZipError</a><ul class="subs"><li>= <a href="#v:CRCError">CRCError</a></li><li>| <a href="#v:NotGZIPFile">NotGZIPFile</a></li><li>| <a href="#v:UnknownMethod">UnknownMethod</a></li><li>| <a href="#v:UnknownError">UnknownError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Footer">Footer</a> = <a href="#v:Footer">Footer</a> {<ul class="subs"><li><a href="#v:size">size</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word32">Word32</a></li><li><a href="#v:crc32">crc32</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word32">Word32</a></li><li><a href="#v:crc32valid">crc32valid</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><a href="#v:decompress">decompress</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a>)</li><li class="src short"><a href="#v:hDecompress">hDecompress</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:Handle">Handle</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a>)</li><li class="src short"><a href="#v:read_sections">read_sections</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> [<a href="System-FileArchive-GZip.html#t:Section">Section</a>]</li><li class="src short"><a href="#v:read_header">read_header</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> (<a href="System-FileArchive-GZip.html#t:Header">Header</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>)</li><li class="src short"><a href="#v:read_section">read_section</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> (<a href="System-FileArchive-GZip.html#t:Section">Section</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>)</li></ul></div><div id="interface"><h1 id="g:1">GZip Files</h1><div class="doc"><p>GZip files contain one or more <code><a href="System-FileArchive-GZip.html#t:Section">Section</a></code>s. Each <code><a href="System-FileArchive-GZip.html#t:Section">Section</a></code>, on disk, begins
with a GZip <code><a href="System-FileArchive-GZip.html#t:Header">Header</a></code>, then stores the compressed data itself, and finally
stores a GZip <code><a href="System-FileArchive-GZip.html#t:Footer">Footer</a></code>.</p><p>The <code><a href="System-FileArchive-GZip.html#t:Header">Header</a></code> identifies the file as a GZip file, records the original
modification date and time, and, in some cases, also records the original
filename and comments.</p><p>The <code><a href="System-FileArchive-GZip.html#t:Footer">Footer</a></code> contains a GZip CRC32 checksum over the decompressed data as
well as a 32-bit length of the decompressed data. The module
<code><a href="Data-Hash-CRC32.html#v:GZip">GZip</a></code> is used to validate stored CRC32 values.</p><p>The vast majority of GZip files contain only one <code><a href="System-FileArchive-GZip.html#t:Section">Section</a></code>. Standard tools
that work with GZip files create single-section files by default.</p><p>Multi-section files can be created by simply concatenating two existing
GZip files together. The standard gunzip and zcat tools will simply
concatenate the decompressed data when reading these files back. The
<code><a href="System-FileArchive-GZip.html#v:decompress">decompress</a></code> function in this module will do the same.</p><p>When reading data from this module, please use caution regarding how you access
it. For instance, if you are wanting to write the decompressed stream
to disk and validate its CRC32 value, you could use the <code><a href="System-FileArchive-GZip.html#v:decompress">decompress</a></code>
function. However, you should process the entire stream before you check
the value of the Bool it returns. Otherwise, you will force Haskell to buffer
the entire file in memory just so it can check the CRC32.</p></div><h1 id="g:2">Types</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Header" class="def">Header</a> <a href="src/System-FileArchive-GZip.html#Header" class="link">Source</a> <a href="#t:Header" class="selflink">#</a></p><div class="doc"><p>The data structure representing the GZip header. This occurs
at the beginning of each <code><a href="System-FileArchive-GZip.html#t:Section">Section</a></code> on disk. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Header" class="def">Header</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:method" class="def">method</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc"><p>Compression method. Only 8 is defined at present.</p></div></li><li><dfn class="src"><a id="v:flags" class="def">flags</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:extra" class="def">extra</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:filename" class="def">filename</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:comment" class="def">comment</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:mtime" class="def">mtime</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word32">Word32</a></dfn><div class="doc"><p>Modification time of the original file</p></div></li><li><dfn class="src"><a id="v:xfl" class="def">xfl</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc"><p>Extra flags</p></div></li><li><dfn class="src"><a id="v:os" class="def">os</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a></dfn><div class="doc"><p>Creating operating system</p></div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:Header" class="caption collapser" onclick="toggleSection('i:Header')">Instances</p><div id="section.i:Header" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Header:Eq:1" class="instance expander" onclick="toggleSection('i:id:Header:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="System-FileArchive-GZip.html#t:Header">Header</a></span> <a href="src/System-FileArchive-GZip.html#line-84" class="link">Source</a> <a href="#t:Header" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Header:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="System-FileArchive-GZip.html#t:Header">Header</a> -> <a href="System-FileArchive-GZip.html#t:Header">Header</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="System-FileArchive-GZip.html#t:Header">Header</a> -> <a href="System-FileArchive-GZip.html#t:Header">Header</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Header:Show:2" class="instance expander" onclick="toggleSection('i:id:Header:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> <a href="System-FileArchive-GZip.html#t:Header">Header</a></span> <a href="src/System-FileArchive-GZip.html#line-84" class="link">Source</a> <a href="#t:Header" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:Header:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="System-FileArchive-GZip.html#t:Header">Header</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="System-FileArchive-GZip.html#t:Header">Header</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="System-FileArchive-GZip.html#t:Header">Header</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Section" class="def">Section</a> = (<a href="System-FileArchive-GZip.html#t:Header">Header</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, <a href="System-FileArchive-GZip.html#t:Footer">Footer</a>) <a href="src/System-FileArchive-GZip.html#Section" class="link">Source</a> <a href="#t:Section" class="selflink">#</a></p><div class="doc"><p>A section represents a compressed component in a GZip file.
Every GZip file has at least one. </p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:GZipError" class="def">GZipError</a> <a href="src/System-FileArchive-GZip.html#GZipError" class="link">Source</a> <a href="#t:GZipError" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:CRCError" class="def">CRCError</a></td><td class="doc"><p>CRC-32 check failed</p></td></tr><tr><td class="src"><a id="v:NotGZIPFile" class="def">NotGZIPFile</a></td><td class="doc"><p>Couldn't find a GZip header</p></td></tr><tr><td class="src"><a id="v:UnknownMethod" class="def">UnknownMethod</a></td><td class="doc"><p>Compressed with something other than method 8 (deflate)</p></td></tr><tr><td class="src"><a id="v:UnknownError" class="def">UnknownError</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a></td><td class="doc"><p>Other problem arose</p></td></tr></table></div><div class="subs instances"><p id="control.i:GZipError" class="caption collapser" onclick="toggleSection('i:GZipError')">Instances</p><div id="section.i:GZipError" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:GZipError:Eq:1" class="instance expander" onclick="toggleSection('i:id:GZipError:Eq:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a></span> <a href="src/System-FileArchive-GZip.html#line-55" class="link">Source</a> <a href="#t:GZipError" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:GZipError:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> -> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> -> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:GZipError:Show:2" class="instance expander" onclick="toggleSection('i:id:GZipError:Show:2')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:Show">Show</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a></span> <a href="src/System-FileArchive-GZip.html#line-55" class="link">Source</a> <a href="#t:GZipError" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:GZipError:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Int.html#t:Int">Int</a> -> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a>] -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:GZipError:Error:3" class="instance expander" onclick="toggleSection('i:id:GZipError:Error:3')"></span> <a href="file:///usr/share/doc/libghc-mtl-doc/html/Control-Monad-Error-Class.html#t:Error">Error</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a></span> <a href="src/System-FileArchive-GZip.html#line-57" class="link">Source</a> <a href="#t:GZipError" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:id:GZipError:Error:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:noMsg">noMsg</a> :: <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> <a href="#v:noMsg" class="selflink">#</a></p><p class="src"><a href="#v:strMsg">strMsg</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> <a href="#v:strMsg" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Footer" class="def">Footer</a> <a href="src/System-FileArchive-GZip.html#Footer" class="link">Source</a> <a href="#t:Footer" class="selflink">#</a></p><div class="doc"><p>Stored on-disk at the end of each section. </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:Footer" class="def">Footer</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:size" class="def">size</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word32">Word32</a></dfn><div class="doc"><p>The size of the original, decompressed data</p></div></li><li><dfn class="src"><a id="v:crc32" class="def">crc32</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Word.html#t:Word32">Word32</a></dfn><div class="doc"><p>The stored GZip CRC-32 of the original, decompressed data</p></div></li><li><dfn class="src"><a id="v:crc32valid" class="def">crc32valid</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether or not the stored CRC-32 matches the calculated CRC-32 of the data</p></div></li></ul></div></td></tr></table></div></div><h1 id="g:3">Whole-File Processing</h1><div class="top"><p class="src"><a id="v:decompress" class="def">decompress</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a>) <a href="src/System-FileArchive-GZip.html#decompress" class="link">Source</a> <a href="#v:decompress" class="selflink">#</a></p><div class="doc"><p>Read a GZip file, decompressing all sections that are found.</p><p>Returns a decompresed data stream and Nothing, or an unreliable string
and Just (error). If you get anything other than Nothing, the String
returned should be discarded.</p></div></div><div class="top"><p class="src"><a id="v:hDecompress" class="def">hDecompress</a> <a href="src/System-FileArchive-GZip.html#hDecompress" class="link">Source</a> <a href="#v:hDecompress" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:Handle">Handle</a></td><td class="doc"><p>Input handle</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/GHC-IO-Handle.html#t:Handle">Handle</a></td><td class="doc"><p>Output handle</p></td></tr><tr><td class="src">-> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/System-IO.html#t:IO">IO</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a>)</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Read a GZip file, decompressing all sections found.</p><p>Writes the decompressed data stream to the given output handle.</p><p>Returns Nothing if the action was successful, or Just GZipError if there
was a problem. If there was a problem, the data written to the output
handle should be discarded.</p></div></div><div class="top"><p class="src"><a id="v:read_sections" class="def">read_sections</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> [<a href="System-FileArchive-GZip.html#t:Section">Section</a>] <a href="src/System-FileArchive-GZip.html#read_sections" class="link">Source</a> <a href="#v:read_sections" class="selflink">#</a></p><div class="doc"><p>Read all sections.</p></div></div><h1 id="g:4">Section Processing</h1><div class="top"><p class="src"><a id="v:read_header" class="def">read_header</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> (<a href="System-FileArchive-GZip.html#t:Header">Header</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>) <a href="src/System-FileArchive-GZip.html#read_header" class="link">Source</a> <a href="#v:read_header" class="selflink">#</a></p><div class="doc"><p>Read the GZip header. Return (Header, Remainder).</p></div></div><div class="top"><p class="src"><a id="v:read_section" class="def">read_section</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a> -> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-Either.html#t:Either">Either</a> <a href="System-FileArchive-GZip.html#t:GZipError">GZipError</a> (<a href="System-FileArchive-GZip.html#t:Section">Section</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.0.0/Data-String.html#t:String">String</a>) <a href="src/System-FileArchive-GZip.html#read_section" class="link">Source</a> <a href="#v:read_section" class="selflink">#</a></p><div class="doc"><p>Read one section, returning (ThisSection, Remainder)</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.2</p></div></body></html>
|