decompress returns length
added version related functions