Avoid potential lock waiting for decompress thread.
Calling decode_to
in compression source means that we have to wait for
the read lock. But we know that the data is already uncompressed.
Change a bit the api to allow only one lock on the decompression thread.
After that, we know the data is decompressed and we can read it.