The framework of secrecy by design is introduced and the fundamental limits of lossless data compression are characterized for this setting. The main idea behind secrecy by design is to begin with an operational secrecy constraint, which is modeled by a secrecy function fs, and then to derive fundamental limits for the performance of the resulting secrecy system. In the setting of lossless compression, it is shown that strong information-theoretic secrecy guarantees can be achieved using a reduced secret key size and a modular two-part coding strategy. Focusing on the non-asymptotic fundamental limits of lossless compression, variable-length lossless compression is studied. It is noted that completely lossless compression is not possible when perfect secrecy is required; however, it becomes meaningful under partial secrecy constraints. Moreover, although it is well known that the traditional fundamental limits of variable-length and almost lossless fixed-length compression are intimately related, this relationship collapses once the secrecy constraint is incorporated.