make dynamic deflate as pthread