check size before decompressing

fixed return value from BOOL to int