danhab99 ( danhab99@programming.dev ) to Programmer Humor@programming.dev · 3 years agoOrderprogramming.devimagemessage-square21linkfedilinkarrow-up1345
arrow-up1345imageOrderprogramming.devdanhab99 ( danhab99@programming.dev ) to Programmer Humor@programming.dev · 3 years agomessage-square21linkfedilink
minus-squareodium ( odium@programming.dev ) linkfedilinkarrow-up2·3 years agoAlso a lay person. Maybe it’s because of the time complexity. Let’s say you have data of size 10 (any unit) which becomes size 8 after compression. If you encrypt first: Encrypt size 10 of data -> Conpress size 10 of data If you compress first: Compress size 10 of data -> Encrypt size 8 of data So second way is faster as the compression still takes the same size of input but the encryption takes a smaller input.
Also a lay person. Maybe it’s because of the time complexity. Let’s say you have data of size 10 (any unit) which becomes size 8 after compression.
If you encrypt first: Encrypt size 10 of data -> Conpress size 10 of data
If you compress first: Compress size 10 of data -> Encrypt size 8 of data
So second way is faster as the compression still takes the same size of input but the encryption takes a smaller input.