7 Commits

6 changed files with 61 additions and 15 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-2010 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

11
NEWS
View File

@ -1,3 +1,14 @@
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 Release 1.0.1
============= =============

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-2010 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:
;;;; ;;;;
@ -38,6 +38,9 @@
;;;; ;;;;
(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>"
:components ((:file "deflate"))) :maintainer "Pierre R. Mai <pmai@pmsf.de>"
:licence "MIT/X11"
:version "1.0.3"
:components ((:file "deflate")))

View File

@ -1,6 +1,6 @@
;;;; Deflate --- RFC 1951 Deflate Decompression ;;;; Deflate --- RFC 1951 Deflate Decompression
;;;; ;;;;
;;;; Copyright (C) 2000-2010 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))