A novel algorithm for text compression is developed which consists of two parts. In the first part the text sample is encoded by the Ziv-Lempel asymptotic structured codebook. In the second part decoding is carried out by a novel rule based (RB) algorithm which improves the compression ratio for a given text sample by up to 50% when compared to the full text search as required by the Ziv-Lempel decoding algorithm.