12 Commits

Author SHA1 Message Date
fb940e63b8 Update Travis CI setup 2020-02-15 14:26:52 +01:00
ba28e9caa8 Fix LispWorks simple-int32-vector declarations 2020-02-15 12:15:32 +01:00
a1677371c4 Add Travis CI support and add badge to README 2018-02-24 00:32:34 +01:00
8353354be3 Add version, licence and maintainer to system definition. 2013-11-21 15:35:40 +01:00
a8dba48d31 Update documentation for 1.0.2 release. 2013-11-21 15:35:23 +01:00
9f0487e414 Make packaging compatible with ACL "modern-mode". 2013-11-21 15:34:50 +01:00
bc063b6b98 Adjust copyright years. 2013-11-21 14:51:29 +01:00
42f1aaab07 Add NEWS file with changes for release 1.0.1. 2010-10-09 03:54:23 +02:00
3f472585bd Update copyright notices for new year. 2010-10-09 03:53:10 +02:00
797adba286 Change fix for ecl bug in bit-stream-read-bits for improved performance.
The previous fix in 929d3f9bc9 has worse
performance than not declaring any type on bits, so we now remove the
declaration completely.
2010-10-09 03:46:03 +02:00
929d3f9bc9 Add work-around bit-stream-read-bits for ecl bug in (unsigned-byte 8) negation.
The compiler in ecl version 10.7.1 generates erroneous code for the negation
of bits in bit-stream-read-bits if bits is declared as an (unsigned-byte 8).
Hence we declare bits as a (signed-byte 8) for ecl, given that ecl does not
generate optimal code in either case, but correct code for the later case.
2010-10-08 20:14:37 +02:00
b18f8fa1da Renamed system from Deflate to deflate to aid symbol naming users.
Whereas asdf system names are strings and hence case-sensitive, many users
of asdf rely on symbol names being treated specially and down-cased to
system names.  That does not work with "Deflate" but does work with "deflate".
NB that this is a non-compatible change for existing users.
2010-10-08 19:56:09 +02:00
6 changed files with 77 additions and 17 deletions

26
.travis.yml Normal file
View File

@ -0,0 +1,26 @@
language: lisp
sudo: required
env:
matrix:
- LISP=abcl
- LISP=allegro
- LISP=sbcl
- LISP=sbcl32
- LISP=ccl
- LISP=ccl32
- LISP=clisp
- LISP=clisp32
- LISP=cmucl
- LISP=ecl
matrix:
allow_failures:
- env: LISP=ccl32
- env: LISP=cmucl
install:
- curl -L https://github.com/luismbo/cl-travis/raw/master/install.sh | sh
script:
- cl -e '(ql:quickload "deflate")'

View File

@ -1,4 +1,4 @@
Copyright (C) 2000-2009 PMSF IT Consulting Pierre R. Mai Copyright (C) 2000-2020 PMSF IT Consulting Pierre R. Mai
Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the

25
NEWS Normal file
View File

@ -0,0 +1,25 @@
Release 1.0.3
=============
* Correct type declarations for LispWorks simple int32 vectors.
Release 1.0.2
=============
* Adjust package name specifications to belatedly support ACL in its
"modern-mode".
Release 1.0.1
=============
* Renamed Deflate system from Deflate to deflate to support
convenience references to system by symbol rather than string name.
NOTE: This is an incompatible change from all prior releases, all
references to "Deflate" in system definitions will have to be
changed to "deflate" or :deflate or equivalents.
* Preliminary support for ecl has been added: Due to bugs in current
versions of ecl (10.7.1), prior versions of Deflate do not work out
of the box. This version should work better, once fixnum-specialized
arrays work again on 64bit versions of ecl in an upcoming release of
ecl.

View File

@ -1,6 +1,8 @@
This library is an implementation of Deflate (RFC 1951) decompression, [![Build Status](https://travis-ci.org/pmai/Deflate.svg?branch=master)](https://travis-ci.org/pmai/Deflate)
with optional support for ZLIB-style (RFC 1950) and gzip-style (RFC
1952) wrappers of deflate streams. It currently does not handle This library is an implementation of Deflate ([RFC 1951][]) decompression,
with optional support for ZLIB-style ([RFC 1950][]) and gzip-style
([RFC 1952][]) wrappers of deflate streams. It currently does not handle
compression, although this is a natural extension. compression, although this is a natural extension.
The implementation should be portable across all ANSI compliant CL The implementation should be portable across all ANSI compliant CL
@ -19,3 +21,7 @@ in the file COPYING and the header of each source file.
Please direct any feedback to pmai@pmsf.de. A git repository of this Please direct any feedback to pmai@pmsf.de. A git repository of this
library is available under http://github.com/pmai/Deflate/tree/master library is available under http://github.com/pmai/Deflate/tree/master
[RFC 1951]: https://tools.ietf.org/html/rfc1951
[RFC 1950]: https://tools.ietf.org/html/rfc1950
[RFC 1952]: https://tools.ietf.org/html/rfc1952

View File

@ -1,6 +1,6 @@
;;;; Deflate --- RFC 1951 Deflate Decompression ;;;; Deflate --- RFC 1951 Deflate Decompression
;;;; ;;;;
;;;; Copyright (C) 2000-2009 PMSF IT Consulting Pierre R. Mai. ;;;; Copyright (C) 2000-2020 PMSF IT Consulting Pierre R. Mai.
;;;; ;;;;
;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; Permission is hereby granted, free of charge, to any person obtaining
;;;; a copy of this software and associated documentation files (the ;;;; a copy of this software and associated documentation files (the
@ -28,7 +28,7 @@
;;;; ;;;;
;;;; $Id$ ;;;; $Id$
(cl:in-package "CL-USER") (cl:in-package #:cl-user)
;;;; %File Description: ;;;; %File Description:
;;;; ;;;;
@ -37,7 +37,10 @@
;;;; ASDF system definition facility. ;;;; ASDF system definition facility.
;;;; ;;;;
(asdf:defsystem "Deflate" (asdf:defsystem "deflate"
:description "Deflate Decompression Library" :description "Deflate Decompression Library"
:author "Pierre R. Mai <pmai@pmsf.de>" :author "Pierre R. Mai <pmai@pmsf.de>"
:maintainer "Pierre R. Mai <pmai@pmsf.de>"
:licence "MIT/X11"
:version "1.0.3"
:components ((:file "deflate"))) :components ((:file "deflate")))

View File

@ -1,6 +1,6 @@
;;;; Deflate --- RFC 1951 Deflate Decompression ;;;; Deflate --- RFC 1951 Deflate Decompression
;;;; ;;;;
;;;; Copyright (C) 2000-2009 PMSF IT Consulting Pierre R. Mai. ;;;; Copyright (C) 2000-2020 PMSF IT Consulting Pierre R. Mai.
;;;; ;;;;
;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; Permission is hereby granted, free of charge, to any person obtaining
;;;; a copy of this software and associated documentation files (the ;;;; a copy of this software and associated documentation files (the
@ -28,15 +28,15 @@
;;;; ;;;;
;;;; $Id$ ;;;; $Id$
(cl:defpackage "DEFLATE" (cl:defpackage #:deflate
(:use "COMMON-LISP") (:use #:common-lisp)
(:export #:decompression-error #:deflate-decompression-error (:export #:decompression-error #:deflate-decompression-error
#:zlib-decompression-error #:gzip-decompression-error #:zlib-decompression-error #:gzip-decompression-error
#:inflate-stream #:inflate-stream
#:inflate-zlib-stream #:parse-zlib-header #:parse-zlib-footer #:inflate-zlib-stream #:parse-zlib-header #:parse-zlib-footer
#:inflate-gzip-stream #:parse-gzip-header #:parse-gzip-footer)) #:inflate-gzip-stream #:parse-gzip-header #:parse-gzip-footer))
(cl:in-package "DEFLATE") (cl:in-package #:deflate)
;;;; %File Description: ;;;; %File Description:
;;;; ;;;;
@ -133,7 +133,7 @@
"CRC-32 Polynomial as per RFC 1952.") "CRC-32 Polynomial as per RFC 1952.")
(declaim (ftype #-lispworks (function () (simple-array (unsigned-byte 32) (256))) (declaim (ftype #-lispworks (function () (simple-array (unsigned-byte 32) (256)))
#+lispworks (function () (sys:simple-int32-vector 256)) #+lispworks (function () sys:simple-int32-vector)
generate-crc32-table)) generate-crc32-table))
(defun generate-crc32-table () (defun generate-crc32-table ()
(let ((result #-lispworks (make-array 256 :element-type '(unsigned-byte 32)) (let ((result #-lispworks (make-array 256 :element-type '(unsigned-byte 32))
@ -182,7 +182,7 @@
(cur (sys:int32-lognot (sys:integer-to-int32 (cur (sys:int32-lognot (sys:integer-to-int32
(dpb (ldb (byte 32 0) crc) (byte 32 0) (dpb (ldb (byte 32 0) crc) (byte 32 0)
(if (logbitp 31 crc) -1 0)))))) (if (logbitp 31 crc) -1 0))))))
(declare (type (sys:simple-int32-vector 256) table) (declare (type sys:simple-int32-vector table)
(type sys:int32 cur)) (type sys:int32 cur))
(dotimes (i end) (dotimes (i end)
(declare (type fixnum i)) (declare (type fixnum i))
@ -287,7 +287,7 @@
(declaim (inline bit-stream-read-bits)) (declaim (inline bit-stream-read-bits))
(defun bit-stream-read-bits (stream bits) (defun bit-stream-read-bits (stream bits)
(declare (type bit-stream stream) (type (unsigned-byte 8) bits)) (declare (type bit-stream stream) #-ecl (type (unsigned-byte 8) bits))
"Read single or multiple bits from the given bit-stream." "Read single or multiple bits from the given bit-stream."
(loop while (< (bit-stream-bit-count stream) bits) (loop while (< (bit-stream-bit-count stream) bits)
do do