More doc updates -- updated vectors example, and minor clarification on using strings as streams.
Sun Sep 7 11:43:46 PDT 2008 mail@chaitanyagupta.com
* More doc updates -- updated vectors example, and minor clarification on using strings as streams.
diff -rN -u old-cl-bzip2/doc/index.html new-cl-bzip2/doc/index.html
--- old-cl-bzip2/doc/index.html 2014-07-28 03:25:17.000000000 -0700
+++ new-cl-bzip2/doc/index.html 2014-07-28 03:25:17.000000000 -0700
@@ -107,20 +107,23 @@
<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))
+CL-USER&#62; (defvar *vec* #(66 104 97 107 99 104 111 100 105 32 109 97 116 32 107 97 114 111 46))
*VEC*
CL-USER&#62; (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)
+#(66 90 104 57 49 65 89 38 83 89 188 189 88 250 0 0 1 149 128 64 1 16 0
+ 44 106 148 0 32 0 34 4 245 52 204 144 128 104 3 109 12 42 5 148 84
+ 110 113 190 46 228 138 112 161 33 121 122 177 244)
CL-USER&#62; (flex:with-input-from-sequence (in *)
(flex:with-output-to-sequence (out)
(bzip2:decompress in out)))
-#(87 101 32 108 111 118 101 32 98 104 97 107 99 104 111 100 46)
+#(66 104 97 107 99 104 111 100 105 32 109 97 116 32 107 97 114 111 46)
+
+CL-USER&#62; (equalp * *vec*)
+T
</code></pre>
<h3 id="dictionary">The cl-bzip2 dictionary</h3>
@@ -156,7 +159,7 @@
<h3 id="limit">Limitations</h3>
- <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>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 (i.e. easily using them as input). 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-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>
diff -rN -u old-cl-bzip2/doc/index.textile new-cl-bzip2/doc/index.textile
--- old-cl-bzip2/doc/index.textile 2014-07-28 03:25:17.000000000 -0700
+++ new-cl-bzip2/doc/index.textile 2014-07-28 03:25:17.000000000 -0700
@@ -97,20 +97,23 @@
Compression/decompression of vectors can easily be done with in-memory binary streams by using, for example, "FLEXI-STREAMS":http://weitz.de/flexi-streams/.
<pre><code>
-CL-USER> (defvar *vec* #(87 101 32 108 111 118 101 32 98 104 97 107 99 104 111 100 46))
+CL-USER> (defvar *vec* #(66 104 97 107 99 104 111 100 105 32 109 97 116 32 107 97 114 111 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)
+#(66 90 104 57 49 65 89 38 83 89 188 189 88 250 0 0 1 149 128 64 1 16 0
+ 44 106 148 0 32 0 34 4 245 52 204 144 128 104 3 109 12 42 5 148 84
+ 110 113 190 46 228 138 112 161 33 121 122 177 244)
;;; Remove me ;;;
CL-USER> (flex:with-input-from-sequence (in *)
(flex:with-output-to-sequence (out)
(bzip2:decompress in out)))
-#(87 101 32 108 111 118 101 32 98 104 97 107 99 104 111 100 46)
+#(66 104 97 107 99 104 111 100 105 32 109 97 116 32 107 97 114 111 46)
+;;; Remove me ;;;
+CL-USER> (equalp * *vec*)
+T
</code></pre>
h3(#dictionary). The cl-bzip2 dictionary
@@ -148,7 +151,7 @@
h3(#limit). Limitations
-As of now, cl-bzip2 works only with binary streams. I haven't figured out an easy way to make it work with string streams. If you know how that can be done, please "let us know":#support.
+As of now, cl-bzip2 works only with binary streams. I haven't figured out an easy way to make it work with string streams (i.e. easily using them as input). If you know how that can be done, please "let us know":#support.
Also, performance is definitely not as great as it can be. If you want to fix that, the guts of the code lie in COMPRESS-STREAM and COMPRESS-STREAM-AUX (for compression), and DECOMPRESS-STREAM and DECOMPRESS-STREAM-AUX (for decompression). Any help would be greatly appreciated!