better error handling of null style argument for TextButton
Merge pull request #1266 from jrenner/textbutton

better error handling of null style argument for TextButton
Fix decoding of layer data.

InflaterInputStream uses a buffer during read. When it gets to the end of
the buffered data during a bulk read, it will not buffer more data until
the next read, so it is not guaranteed that the full 4 bytes will be read
in one read operation. Attempt to read more bytes until we get our 4
bytes, or until we hit the end of the stream.