refactor decompress_ptr to reduce copy 'n' paste
docstrings for decompression helpers