Thread-safe abstract decompression routine. Uncompresses memory from compressed buffer and writes it to uncompressed buffer. UncompressedSize is expected to be the exact size of the data after decompression.