PHP Class implementation of LZ-String javascript