Compression by extensible motifs