Various embodiments are provided for securing data compression in a computer environment are presented. Encryption cycles of a data compression stream may be optimized by applying a first type of encryption on a first section and a last section of compressed data and a second type of encryption on a middle section of compressed data, the first type of encryption containing key information relating to the middle section of the compressed data.