Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/zlib|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags: egg]] == zlib [[toc:]] === Description zlib bindings for Chicken Scheme zlib is a popular data compression library that uses the DEFLATE algorithm internally. It is defined in [[http://tools.ietf.org/html/rfc1950|RFC 1950]]. Note: if you are using a CHICKEN version < 4.8.3 and experiencing unexpected behavior with this egg, check [[http://bugs.call-cc.org/ticket/1033|ticket #1033]]. === Author Joseph Gay === Requirements [[foreigners]] [[miscmacros]] === Documentation ==== Procedures These bindings provide two procedures: <procedure>(open-zlib-compressed-input-port [INPUT-PORT])</procedure> Returns an input-port. <procedure>(open-zlib-compressed-output-port [OUTPUT-PORT])</procedure> Returns an output-port. The first is for inflating an existing zlib stream and the second for deflating data into a new stream. ==== Examples ===== Inflating a stream: <enscript highlight=scheme> (with-input-from-port (open-zlib-compressed-input-port) read-string) </enscript> ===== Deflating a stream: <enscript highlight=scheme> (with-output-to-port (open-zlib-compressed-output-port) (lambda () (write-string (read-string)) (close-output-port (current-output-port)))) </enscript> === Notes * This is expecting the zlib format, not raw DEFLATE or the gzip format, which are defined in RFCs 1951 and 1952 respectively. See [[z3]] for DEFLATE and gzip support. * When finished deflating, it is important to always close the zlib output-port. This will ensure that the zlib trailing data is written along with any data still buffered. The destination port will remain open after the zlib port is closed. === Source Source code is available in the eggs repository as well as on github: [[https://github.com/joseph-gay/cscm-zlib]] === Version ; 0.5.1 : added missing dependency to miscmacros ; 0.5 : Initial release === License Copyright (C) 2011 by Joseph Gay This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA zlib: Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler see http://zlib.net/zlib_license.html
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you multiply 0 by 4?