A: 

After all this time, I've finally found the problem. The data is in zlib format, which has a bit more data stored than just using DEFLATE alone. The file is read properly if I just read the 2 extra bytes in right before I get the compressed data.

See this feedback page. (I did not submit that one.)

I'm wondering now. The value of those two bytes are 0x78 and 0x9C respectively. If I find values other than those, should I assume the DEFLATE is going to fail?

YotaXP
http://www.faqs.org/rfcs/rfc1950.html describes the ZLib format. The first byte 0x78 is called CMF, and the value means CM = 8, CINFO = 7. CM = 8 denotes the "deflate" compression method with a window size up to 32K. This is the method used by gzip and PNG. CINFO = 7 indicates a 32K window size. The 0x9C is called FLG and the value means FLEVEL = 2, CHECK = 28. The information in FLEVEL is not needed for decompression; it is there to indicate if recompression might be worthwhile. CHECK is set to whatever value is necessary such that CMF*256 + FLG is a multiple of 31.
Bing