We propose a new construction - the Z-algebra construction for the W-a
lgebra which includes the Virasoro algebra as a special case. The Z-al
gebra associated with the general affine Lie algebra is given. And we
suggest a calculating program to make the derivation of the Z-algebra
become possible. Using this technique we have derived the Virasoro alg
ebra in general G(k) parafermion case and the W-algebra in SU(2)k para
fermion case.