METHOD OF STRUCTURING AND COMPRESSING LABELED TREES OF ARBITRARY DEGREE AND SHAPE