when creating an inflate-stream, one can optionally have the stream
automatically detect and skip gzip or zlib headers and trailers. If
the first byte checked (via read-byte) was an invalid header byte,
we attempt to unread the byte read in via unread-char.
1. It is an error to unread-char when no read-char has been performed.
2. If the stream has a multi-byte external-format, the unread-char may
inadvertently be unreading a multi-byte octet or invalid character.
The fix made here is to bind the stream-external-format to :latin1,
saving the original external-format and restoring it via an
unwind-protect. Then, read-char is used to check the first byte, and
unread-byte is used if the char does not match the expected first byte
of a gzip or zlib stream.
Are there user visible changes in this commit? no
Are tests included for new features? no new features
Tests run: make test
Change-Id: I6d431b80fba1fa92ad1e0b4fc6a9732e49484316

when creating an inflate-stream, one can optionally have the stream
automatically detect and skip gzip or zlib headers and trailers. If
the first byte checked (via read-byte) was an invalid header byte,
we attempt to unread the byte read in via unread-char.
1. It is an error to unread-char when no read-char has been performed.
2. If the stream has a multi-byte external-format, the unread-char may
inadvertently be unreading a multi-byte octet or invalid character.
The fix made here is to bind the stream-external-format to :latin1,
saving the original external-format and restoring it via an
unwind-protect. Then, read-char is used to check the first byte, and
unread-byte is used if the char does not match the expected first byte
of a gzip or zlib stream.
Are there user visible changes in this commit? yes/no
Is bootstrapping needed? yes/no
Are tests included for new features? Possible answers:
Tests run: none / make all / other (specify)
Change-Id: I6d431b80fba1fa92ad1e0b4fc6a9732e49484316

t-gzip is potentially run from other locations than the zlib/
directory, where it may iterate over many large files,
making the test run for hours instead of seconds. Make this
less likely to occur.
Are there user visible changes in this commit? no
Change-Id: I1c2772effeb0e630f417f548843b9cc5a572bc1d

deflate-streams
change definition of _compress-spec_ as follows:
:gzip - create a deflate stream w/ gzip headers (same)
:zlib - create a deflate stream w/ zlib headers (was :deflate)
:deflate - create a deflate stream w/ NO headers.
the meaning of :deflate as currently documented is confusing since
to zlib users, it suggests no headers will be added but in truth
a compressed stream with zlib headers is what you get.
inflate-streams
add a :compression keyword argument that mirrors deflate-streams,
with a couple of extra allowed values
:gzip - (default). Automatically read past gzip header and trailer
:zlib - read past zlib header/trailer
:deflate - no headers in this stream.
(header-fn trailer-fn) -
Instead of one of the above methods, users may specify their own
functions for skipping past headers and trailers wrapping the
DEFLATE stream. This can be used to support less common encoding
methods, such as zip or pkzip, etc. The inflate module does not
capture any information from header and trailers, so the custom
functions can also be used to capture this information if needed.
The function accepts a single argument, which is the input-handle
of the inflate-stream. It should return nil or the number of bytes
read.
nil - equivalent to the :deflate option. No callbacks are made.
(*) gzip is the default compression method to maintain compatibility with
aserve compression.
The :skip-gzip-header keyword is deprecated, but no warning is issued
if used. This is to maintain compatibility with AllegroServe. If a
compression method is specified, the header and trailer are always
automatically skipped.
skip-gzip-trailer, skip-zlib-header, and skip-zlib-trailer are exported
from the :util.zip package.
Internally, a number of test routines have also been updated to
remove calls to skip-gzip-header that are no longer necessary.
Are there user visible changes in this commit? yes
Are tests included for new features? yes
Tests run: make all
<release-notes>
bug20472. Improve way headers and trailers around deflate streams are handled.
See description above. It's the same.
</release-notes>
<documentation>
bug20472. (or from text above)
</documentation>
Change-Id: I0e90e1f2850b2a4da64e3d9cbf2cdac08847e956

Add declarations to inflate.cl to improve performance.
Add t-iperf.cl for performance testing on inflate.cl
Add test for the inflate module, to existing deflate
tests in t-gzip.cl
Are there user visible changes in this commit? no
Are tests included for new features? yes, but no new features.
Tests run: make all
Change-Id: I0ea48cf01c2c7cbb3f057360946d9ac9f3116ca0

Now allow zlib code to free space it had malloc'ed.
Are there user visible changes in this commit? no
Is bootstrapping needed? no
Are tests included for new features? no
Tests run: manual test watching vm size to verify fix
Change-Id: If988821daf4ffeaee1d58b4f75354ae866d74982

FreeBSD changes the name of this library more than other
platforms, which seem to keep it at .1, for the most part.
This value of libz.so.3 good for FreeBSD 6.1, but will need to change
for later versions, no doubt.
Change-Id: Ief643ddf8a65701927f1032b3fe279b8e10d5374

In order for code needing compression to check if the deflate.fasl file was
loaded successfully deflate.fasl puts :zlib-deflate on the *features* list.
We use zlib rather than libz since the authors refer to this code
as zlib and I suppose they didn't want to name the library on
Linux libzlib so it was shortened to libz. It may have other names
on other operating system.
Are there user visible changes in this commit? yes
Is bootstrapping needed? no
Are tests included for new features? no (a trival change)
Tests run: none
<release-note>
add :zlib-deflate to *features*
If deflate.fasl was sucessfully loaded, which means that the zlib
foreign library (called libz.so on Linux) was found and loaded as well,
then :zlib-deflate will be found on *features*
</release-note>
Change-Id: Iee9be53bb07b7581ca579fdc84ece26e73683725

In case libz can't be loaded we emit a message which will help
the user find the library.
Are there user visible changes in this commit? no
Is bootstrapping needed? no
Are tests included for new features? no new features
Tests run: none
Change-Id: I348241ee5a14b0425fbab91bcf9f6bcf2a2facfe

The deflate stream is in interface to the libz compression library
found on most unix systems and available on Windows system.
In this commit we've only tested on Linux
Are there user visible changes in this commit? yes
Is bootstrapping needed? no
Are tests included for new features? no, but aserve's tests test this
Tests run: none
<release-note>
new deflate-stream and improved inflate-stream
The deflate-stream is documented in deflate.txt in this module.
The inflate stream change is that there is a new argument
to make-instance of an inflate-stream: :skip-gzip-header
with description:
Streams to be inflated often begin with a gzip header which
must be skipped over before inflation can begin. Now you can
pass the argument :skip-gzip-header t to the call to
make-instance of an inflate-stream. If the stream begins with
a gzip header then that header will be skipped. If the stream
doesn't begin with a gzip header then this argument has no effect
</release-note>
<documentation>
see deflate.txt for documentation on the deflate-stream
</documentation>
Change-Id: I37fdea747a8e31a414fc7c986a38190de562181a