на всякий случай:
Note: If you want to use this function to uncompress external data compressed using zlib, you first need to prepend four bytes to the byte array that contain the expected length (as an unsigned integer) of the uncompressed data encoded in big-endian order (most significant byte first).