operasoftware/jsunzip — pull request #3 by mikewallace1979 (2012-11-08 16:54:18+00:00)
Title: Fix reading of extra bits for distance codes with >8 extra bits

Extra bits for distance codes of 20 or greater (where there are more
than 8 bits) were not being read. This meant the wrong offset was being
calculated, resulting in the wrong string of bytes being copied into
the inflated block.

This patch modifies function read_bits to handle up to 16 bits, which
means the correct offset is calculated.