Add sprite compress function