ArrayIndexOutOfBoundsException in Tree.d_code
  * https://github.com/ymnk/jzlib/issues/9
  * fixed a bug in calculating the size of the pending buffer.
  * added a test case based on https://github.com/jglick/jzlib-9-demo