improved decompressing and changed target api