| Post/Author/DateTime | Post |
|---|---|
| #1uglyvanJun 05, 2013 8:14:42 | written in justbasic 1.01 dim u(255) open "puckupazipfile.zip" for input as #f open "report.raw" for output as #g lf=lof(#f) for i=1 to lf a=asc(input$(#f,1)) u(a)=u(a)+1 t(i)=a next i for i=0 to 255 zz=0 for j=0 to 255 if u(j)>zz then end if next j next i for j=0 to 255 print #g, chr$(w(j)); 'print #g, str$(v(w(j))); print j z=0 if s(i)=1 then if t(i)=w(j) then if t(i-z-zztop)>255 then do end if z=i next i next j close #g end |
| #2uglyvanJun 05, 2013 8:18:48 |
first, we create a total for each number (from 0 to 255) then we sort for the most frequent number |
| #3uglyvanJun 05, 2013 8:24:28 |
then we use distance between two occurences of the same number; the idea then is to say when you have read your file one time and found say a 237 at occurence 22 , then if there is a 40 at occurence 24 you can substract 1 (the occurence 22) so you put a 23 for the occurence of the number 40. |
| #4uglyvanJun 05, 2013 8:45:53 | then, subject "report.raw" to Winzip the new size of "puckupazipfile.zip" is shorter than before |
| #5melloredJun 05, 2013 8:46:39 | What's the pont of compressing something that you can't uncompress? And you really want better variable names. This is zztop. |