mhm non saprei dirti molto, speriamo passi qualcuno che l'ha usata più di me questa funzione...l'unica cosa che posso suggerirti è ciò che dice il manuale ma non ho idea se sia questo il caso

codice:
The function will return an error if the uncompressed data is more than 32768 times the length of the compressed input data or more than the optional parameter length.