LZ-factorization