v0.4.0 release
v0.4.0 release

API Changes:

1. The limits for the window and lookahead size options have changed.
The minimum lookahead bits option (-l) is now 3 (previously, 2), and the
maximum is the window bits - 1 (previously, equal to the window bits).

Bug Fixes:

1. There was an edge case in the internal buffering where window bits of
4 and lookahead bits of 2 could cause up to 3 bytes of data to be lost
from the end of the bytestream. Thanks to @unixdj for reporting this,
with detailed notes on how to reproduce it.

2. Using a lookahead bits setting equal to the window bits (e.g. -w 8 -l
8) could lead to an infinite loop. Aside from fixing the root cause, now
the lookahead size must be smaller than the window size -- an equal
lookahead size will always lead to worse compression, and should
probably have never been a valid setting. Found by @unixdj.

3. A few compiler warnings due to signed/unsigned warnings have been
resolved.

Other Improvements:

1. The logic for determining whether a pattern substitution is
worthwhile has been improved, potentially leading to better compression.
Decoders from earlier releases should have no problems processing the
output from newer encoders.

2. A benchmarking suite has been added, to measure the impact of changes
on speed and compression ratios.

3. The encoder and decoder state machines have been streamlined,
reducing overall complexity. Thanks again to @unixdj, who saw
opportunities to simplify things while investigating other issues, and
did most of the work.

4. Notes on example usage and configuration have been added to the README.

5. Initial notes for potential contributors (CONTRIBUTING.md) have been
added.

6. The theft-based property tests are now exploring the full state space
of the program. Previously, some of the test cases weren't varying the
window or lookahead sizes, only the input data. This led to a couple
bugs (1 and 2 above) going undetected. Now all three are changed, as
well as the input buffer size for the decoder.

senyor/heatshrink,atomicobject/heatshrink,atomicobject/heatshrink,jordandcarter/heatshrink,senyor/heatshrink,silentbicycle/heatshrink,silentbicycle/heatshrink,jordandcarter/heatshrink