Updated documentation.
Sat Sep 6 08:11:25 PDT 2008 mail@chaitanyagupta.com
* Updated documentation.
diff -rN -u old-cl-bzip2/doc/index.html new-cl-bzip2/doc/index.html
--- old-cl-bzip2/doc/index.html 2014-08-01 15:30:53.000000000 -0700
+++ new-cl-bzip2/doc/index.html 2014-08-01 15:30:53.000000000 -0700
@@ -8,23 +8,30 @@
<h3 id="introduction">Introduction</h3>
- <p>cl-bzip2 provides <a href="http://common-lisp.net/project/cffi/"><span class="caps">CFFI</span></a> bindings for libbzip2 &#8212; the <a href="http://www.bzip.org/">bzip2</a> compression/decompression library. It comes with a <a href="http://www.opensource.org/licenses/bsd-license.php">BSD-style license</a>.</p>
+ <p>cl-bzip2 provides <a href="http://common-lisp.net/project/cffi/">CFFI</a> bindings for libbzip2 &#8212; the <a href="http://www.bzip.org/">bzip2</a> compression/decompression library. It comes with a <a href="http://www.opensource.org/licenses/bsd-license.php">BSD-style license</a>.</p>
<h3 id="contents">Contents</h3>
- <ol>
- <li><a href="#download">Download and installation</a></li>
- <li><a href="#support">Support and mailing lists</a></li>
- <li><a href="#examples">Examples</a>
- <ol>
- <li><a href="#compression">Compression</a></li>
- <li><a href="#decompression">Decompression</a></li>
- <li><a href="#vectors">Working with vectors</a></li>
- </ol></li>
- <li><a href="#dictionary">The cl-bzip2 dictionary</a></li>
- <li><a href="#limit">Limitations</a></li>
- <li><a href="#acknowledgements">Acknowledgements</a></li>
- </ol>
+<ol>
+ <li><a href="#download">Download and installation</a></li>
+ <li><a href="#support">Support and mailing lists</a></li>
+ <li><a href="#examples">Examples</a>
+ <ol>
+ <li><a href="#compression">Compression</a></li>
+ <li><a href="#decompression">Decompression</a></li>
+ <li><a href="#vectors">Working with vectors</a></li>
+ </ol>
+ </li>
+ <li><a href="#dictionary">The cl-bzip2 dictionary</a>
+ <ul>
+ <li><a href="#bz_error"><code>bz-error</code></a></li>
+ <li><a href="#compress"><code>compress</code></a></li>
+ <li><a href="#decompress"><code>decompress</code></a></li>
+ </ul>
+ </li>
+ <li><a href="#limit">Limitations</a></li>
+ <li><a href="#acknowledgements">Acknowledgements</a></li>
+</ol>
<h3 id="download">Download and installation</h3>
@@ -39,7 +46,9 @@
<p>cl-bzip2 has a couple of dependencies:</p>
<ol>
- <li><a href="http://common-lisp.net/project/cffi/"><span class="caps">CFFI</span></a> &#8212; the Common Foreign Function Interface, which provides C bindings for</li>
+ <li><a href="http://common-lisp.net/project/cffi/">CFFI</a> &#8212; the Common Foreign Function Interface, which provides C bindings for</li>
+ </ol>
+ <ol>
<li><a href="http://www.bzip.org/downloads.html">libbzip2</a> &#8212; The C library for compressing and decompressing data in the bzip2 format. Make sure the shared object library (libbz2.so/libbz2.dylib) is installed on your machine. The bzip2 manual can be found <a href="http://www.bzip.org/1.0.5/bzip2-manual-1.0.5.html">here</a>.</li>
</ol>
@@ -53,7 +62,7 @@
<h4 id="compression">Compression</h4>
- <p>Use <span class="caps">COMPRESS</span> to compress data from a stream/pathname to another stream/pathname. Note that stream should be a binary stream. <span class="caps">COMPRESS</span> will not work with string streams i.e. a stream supplied by <span class="caps">WITH</span>-<span class="caps">INPUT</span>-<span class="caps">FROM</span>-<span class="caps">STRING</span> or <span class="caps">WITH</span>-<span class="caps">OUTPUT</span>-TO-<span class="caps">STRING</span> will most likely not work at all.</p>
+ <p>Use <span class="caps">COMPRESS</span> to compress data from a stream/pathname to another stream/pathname. Note that stream should be a binary stream. <span class="caps">COMPRESS</span> will not work with string streams i.e. a stream supplied by <span class="caps">WITH-INPUT-FROM-STRING</span> or <span class="caps">WITH-OUTPUT-TO-STRING</span> will most likely not work at all.</p>
<pre><code>
;;; Compression usage
@@ -86,7 +95,7 @@
CL-USER&#62; (bzip2:decompress #p&#34;test.txt.bz2&#34; #p&#34;test.txt&#34;)
; No value
-;;; Using binaray streams
+;;; Using binary streams
CL-USER&#62; (with-open-file (in &#34;test.txt.bz2&#34; :direction :input :element-type &#39;(unsigned-byte 8))
(with-open-file (out &#34;test.txt&#34; :direction :output :element-type &#39;(unsigned-byte 8))
(bzip2:decompress in out)))
@@ -95,7 +104,7 @@
<h4 id="vectors">Working with vectors</h4>
- <p>Compression/decompression of vectors can easily be done with in-memory binary streams by using, for example, <a href="http://weitz.de/flexi-streams/"><span class="caps">FLEXI</span>-<span class="caps">STREAMS</span></a>.</p>
+ <p>Compression/decompression of vectors can easily be done with in-memory binary streams by using, for example, <a href="http://weitz.de/flexi-streams/">FLEXI-STREAMS</a>.</p>
<pre><code>
CL-USER&#62; (defvar *vec* #(87 101 32 108 111 118 101 32 98 104 97 107 99 104 111 100 46))
@@ -116,14 +125,14 @@
<h3 id="dictionary">The cl-bzip2 dictionary</h3>
- <p class="symbol">[Condition type]<br />
+ <p class="symbol" id="bz_error">[Condition type]<br />
<b>bz-error</b></p>
<blockquote>
<p>The default condition type for any BZIP2 compression/decompression related error.</p>
</blockquote>
- <p class="symbol">[Function]<br />
+ <p class="symbol" id="compress">[Function]<br />
<b>compress</b> <i>in out <tt>&amp;key</tt> block-size-100k verbosity work-factor</i></p>
<blockquote>
@@ -135,7 +144,7 @@
<p>Parameter <i><code>workFactor</code></i> controls how the compression phase behaves when presented with worst case, highly repetitive, input data. If compression runs into difficulties caused by repetitive data, the library switches from the standard sorting algorithm to a fallback algorithm. The fallback is slower than the standard algorithm by perhaps a factor of three, but always behaves reasonably, no matter how bad the input.</p>
</blockquote>
- <p class="symbol">[Function]<br />
+ <p class="symbol" id="decompress">[Function]<br />
<b>decompress</b> <i>in out <tt>&amp;key</tt> verbosity smallp</i></p>
<blockquote>
@@ -149,13 +158,13 @@
<p>As of now, cl-bzip2 works only with binary streams. I haven&#8217;t figured out an easy way to make it work with string streams. If you know how that can be done, please <a href="#support">let us know</a>.</p>
- <p>Also, performance is definitely not as great as it can be. If you want to fix that, the guts of the code lie in <span class="caps">COMPRESS</span>-<span class="caps">STREAM</span> and <span class="caps">COMPRESS</span>-<span class="caps">STREAM</span>-<span class="caps">AUX</span> (for compression), and <span class="caps">DECOMPRESS</span>-<span class="caps">STREAM</span> and <span class="caps">DECOMPRESS</span>-<span class="caps">STREAM</span>-<span class="caps">AUX</span> (for decompression). Any help would be greatly appreciated!</p>
+ <p>Also, performance is definitely not as great as it can be. If you want to fix that, the guts of the code lie in <span class="caps">COMPRESS-STREAM</span> and <span class="caps">COMPRESS-STREAM-AUX</span> (for compression), and <span class="caps">DECOMPRESS-STREAM</span> and <span class="caps">DECOMPRESS-STREAM-AUX</span> (for decompression). Any help would be greatly appreciated!</p>
<h3 id="acknowledgements">Acknowledgements</h3>
<p>Thanks to Julian Seward for the bzip2 compression format and the excellent libbzip2 interface.</p>
- <p>Thanks also to <a href="http://piecesofrakesh.blogspot.com/">Rakesh Pai</a> for helping out with the <span class="caps">CSS</span> for this page. (And that became my introduction to <span class="caps">CSS</span>!). The markup for the cl-bzip2 dictionary was inspired from <a href="http://weitz.de/documentation-template/"><span class="caps">DOCUMENTATION</span>-<span class="caps">TEMPLATE</span></a>.</p>
+ <p>Thanks also to <a href="http://piecesofrakesh.blogspot.com/">Rakesh Pai</a> for helping out with the <span class="caps">CSS</span> for this page. (And that became my introduction to CSS!). The markup for the cl-bzip2 dictionary was inspired from <a href="http://weitz.de/documentation-template/">DOCUMENTATION-TEMPLATE</a>.</p>
</body>
</html>
diff -rN -u old-cl-bzip2/doc/index.textile new-cl-bzip2/doc/index.textile
--- old-cl-bzip2/doc/index.textile 2014-08-01 15:30:53.000000000 -0700
+++ new-cl-bzip2/doc/index.textile 2014-08-01 15:30:53.000000000 -0700
@@ -6,15 +6,26 @@
h3(#contents). Contents
-# "Download and installation":#download
-# "Support and mailing lists":#support
-# "Examples":#examples
-## "Compression":#compression
-## "Decompression":#decompression
-## "Working with vectors":#vectors
-# "The cl-bzip2 dictionary":#dictionary
-# "Limitations":#limit
-# "Acknowledgements":#acknowledgements
+<ol>
+ <li><a href="#download">Download and installation</a></li>
+ <li><a href="#support">Support and mailing lists</a></li>
+ <li><a href="#examples">Examples</a>
+ <ol>
+ <li><a href="#compression">Compression</a></li>
+ <li><a href="#decompression">Decompression</a></li>
+ <li><a href="#vectors">Working with vectors</a></li>
+ </ol>
+ </li>
+ <li><a href="#dictionary">The cl-bzip2 dictionary</a>
+ <ul>
+ <li><a href="#bz_error"><code>bz-error</code></a></li>
+ <li><a href="#compress"><code>compress</code></a></li>
+ <li><a href="#decompress"><code>decompress</code></a></li>
+ </ul>
+ </li>
+ <li><a href="#limit">Limitations</a></li>
+ <li><a href="#acknowledgements">Acknowledgements</a></li>
+</ol>
h3(#download). Download and installation
@@ -45,15 +56,18 @@
<pre><code>
;;; Compression usage
+;;; Remove me ;;;
;;; No values are returned if execution was successful
;;; Using pathnames
CL-USER> (bzip2:compress #p"test.txt" #p"test.txt.bz2")
; No value
+;;; Remove me ;;;
;;; Using binary streams
CL-USER> (with-open-file (in "test.txt" :direction :input :element-type '(unsigned-byte 8))
(with-open-file (out "test.txt.bz2" :direction :output :element-type '(unsigned-byte 8))
(bzip2:compress in out)))
; No value
+;;; Remove me ;;;
;;; Mixing stream and pathname
CL-USER> (with-open-file (in "test.txt" :direction :input :element-type '(unsigned-byte 8))
(bzip2:compress in #p"test.txt.bz2"))
@@ -66,10 +80,12 @@
<pre><code>
;;; Decompression usage is similar to that for compression
+;;; Remove me ;;;
;;; Using pathnames
CL-USER> (bzip2:decompress #p"test.txt.bz2" #p"test.txt")
; No value
-;;; Using binaray streams
+;;; Remove me ;;;
+;;; Using binary streams
CL-USER> (with-open-file (in "test.txt.bz2" :direction :input :element-type '(unsigned-byte 8))
(with-open-file (out "test.txt" :direction :output :element-type '(unsigned-byte 8))
(bzip2:decompress in out)))
@@ -83,12 +99,14 @@
<pre><code>
CL-USER> (defvar *vec* #(87 101 32 108 111 118 101 32 98 104 97 107 99 104 111 100 46))
*VEC*
+;;; Remove me ;;;
CL-USER> (flex:with-input-from-sequence (in *vec*)
(flex:with-output-to-sequence (out)
(bzip2:compress in out)))
#(66 90 104 57 49 65 89 38 83 89 229 1 241 105 0 0 1 147 128 64 1 0 128
62 76 129 0 32 0 49 0 208 1 76 152 200 210 14 15 24 181 167 18 7 79
197 220 145 78 20 36 57 64 124 90 64)
+;;; Remove me ;;;
CL-USER> (flex:with-input-from-sequence (in *)
(flex:with-output-to-sequence (out)
(bzip2:decompress in out)))
@@ -97,12 +115,12 @@
h3(#dictionary). The cl-bzip2 dictionary
-p(symbol). [Condition type]
+p(symbol#bz_error). [Condition type]
<b>bz-error</b>
bq. The default condition type for any BZIP2 compression/decompression related error.
-p(symbol). [Function]
+p(symbol#compress). [Function]
<b>compress</b> <i>in out <tt>&amp;key</tt> block-size-100k verbosity work-factor</i>
bq.. Compresses data from <i>@IN@</i> to <i>@OUT@</i>. <i>@IN@</i> or <i>@OUT@</i> can either be a binary stream or a pathname.
@@ -117,7 +135,7 @@
Parameter <i>@workFactor@</i> controls how the compression phase behaves when presented with worst case, highly repetitive, input data. If compression runs into difficulties caused by repetitive data, the library switches from the standard sorting algorithm to a fallback algorithm. The fallback is slower than the standard algorithm by perhaps a factor of three, but always behaves reasonably, no matter how bad the input.
-p(symbol). [Function]
+p(symbol#decompress). [Function]
<b>decompress</b> <i>in out <tt>&amp;key</tt> verbosity smallp</i>
bq.. Decompresses data from <i>@IN@</i> to <i>@OUT@</i>. <i>@IN@</i> or <i>@OUT@</i> can either be a binary stream or a pathname.
diff -rN -u old-cl-bzip2/doc/style.css new-cl-bzip2/doc/style.css
--- old-cl-bzip2/doc/style.css 2014-08-01 15:30:53.000000000 -0700
+++ new-cl-bzip2/doc/style.css 2014-08-01 15:30:53.000000000 -0700
@@ -15,6 +15,10 @@
margin-left: 30px;
}
+ul {
+ margin-left: 30px;
+ }
+
h2 {
margin: 10px 0;
border-bottom: 1px solid #000;