The present disclosure provides methods, computer program products and apparatuses for text compression and decompression wherein a desired compression ratio may be obtained, and the compressed content per se is still in a searchable text form, thereby providing a possibility for searching without decompression and significantly saving storage space and enhancing search efficiency, and in turn, reducing the total cost ownership TCO and providing a better user experience.