[Sussex] Compression , Encryption and Silliness

nik nik at reducedhackers.com
Tue Apr 12 17:21:20 UTC 2005


Lets start with a simple text file : TestB4Compression .

It contains

nik at crudpuppy:~/tmp$ cat TestB4Compression
Mary had a little lamb
its fleece was white as snow
and everywhere that mary went
her lamb was sure to go

nik at crudpuppy:~/tmp$

Now lets gzip -c Testb4Compression > TestB4Compression.gz

Now when I cat it i see


nik at crudpuppy:~/tmp$ cat TestB4Compression.gz

0ó[BTestB4CompressionÁ
ÿÂ
1DC+VjQ·§ð;Yç[´$Ý¡(Ù½E¯U²BnD¨!RvbÕ¢uöð¤ëë«ËÜþÆ´û▒Îinik at crudpuppy:~/tmp$


If I tar it with czvf .... I can see it as


nik at crudpuppy:~/tmp$ cat TestB4Compression.tgz

ó[BíÏANÃ0P¯}9Ø©ìaÝ]/`èÐXMìÊbõö$B,ÝTBTÿm¾eG3;.òäÓtÊ\JHQÝuÎ-iûÖ|Ïm²¦iº¾·m¿QÆ:ÓmòsT
Ç_뮽îòÿÄÖç
~OÆ 22~zÑA
½Ì¯LÕªC¦ùPbªÚÇ=ñ;çK83ÉথOå(z¾[{¬Ëy)HtH¤õ_ï
pO>¬+_▒(

nik at crudpuppy:~/tmp$


now if I look at the file sizes...

nik at crudpuppy:~/tmp$ ls -alrh Tes*
-rw-r--r-- 1 nik nik 219 Apr 12 17:13 TestB4Compression.tgz
-rw-r--r-- 1 nik nik 119 Apr 12 17:12 TestB4Compression.gz
-rw-r--r-- 1 nik nik 108 Apr 12 17:12 TestB4Compression
nik at crudpuppy:~/tmp$


So ... on really small files compression adds overhead ( obvious that ) 
... Note though that the .gz file and .tgz file are not exactly plain 
text either ... though not truly encypted I leave it to the clever dicks 
here to work out this file. ( ive removed the extension to add a layer 
of difficulty )
nik at crudpuppy:~/tmp$ cat TestFileExample

Úô[BíÏA aÖnàêº ±´IÁû
Vq¡«Æüßb3°▒1âZTÞ¹&ìå5.(#ÖúìN¼c±JËK=\rég­Õ8?¾ûvÿÊ3ÿDwº)åZ{]»vF]nó6æ¸ÝüzMÀp.5

(nik at crudpuppy:~/tmp$


Note : none of the TestFileExample is actually encrypted !

Nik







More information about the Sussex mailing list