Although conventional compression tools achieve good compression rates, they ignore the security issue. This study presents the design and implementation of a lossless compression algorithm with embedded security to fill that gap. The scheme introduced is a system with encoding and decoding and is oriented for text type of data. It is implemented on sample text files from standard English Calgary Corpus. Two ideas, one hiding the encryption key by using a PRNG and the other employing multiple iterations to dissipate language statistics, are suggested to strengthen the security of the system. Both ideas are implemented and promising results have been obtained.