View Full Version : Abundant Lack Of Crap To Do
Idbeholda
11-08-2002, 02:12 PM
Seems there's a whole lotta nothin goin on in this forum. As a suggestion for anyone who might actually be interested in a challenge, this one relates to file compression. The one I am currently working on will be posted on my site sometime by mid-next week.
*seriously doubts there will be any response* heh
-$mev-
11-08-2002, 02:27 PM
I dont see where you are coming from.. you'll find this forum is one of the biggest around.. hackers.com is no doubt bigger but less friendly... i don't know of many forums people have as big/bigger than limpkinw and as for this challenge... u gonna tell us or what? :p
Idbeholda
11-08-2002, 02:33 PM
i'm referring to the lack of weekly programming challenges
Idbeholda
11-08-2002, 02:46 PM
will do. here's a quick overview of how the one i'm making functions.
*all numeric values in the file are in hex*
The header at the beginning of the file contains the original filename along with the a value after it that determines in what byte chunks the data will be read and processed. Below that, another value is stored to show how many chunks of data should be processed in the following string.
The next amount of data contains a string that has all unique patterns within the file according to the user's specifications. This is finally followed by the data which uses byte patterns (by using hex functions yet again), to use the 3rd chunk of information to rebuild the original file.... which all 4 parts would look a little bit somethin like this....
*note, <val> will be byte values, anything over ascii255 will be carried over into 2byte values, etc, etc.
crap.tmp\4
8
****AAAABBBBCCCCDDDDEEEEFFFFGGGG
<1><1><2><4><1><6><7><7><8><2><1><5><3><3><1><1><1><1> etc etc
which would be converted back to crap.tmp (with the following data when uncompressed)
********AAAACCCC****EEEEFFFFFFFFGGGGAAAA****DDDDBB BBBBBB****************
57bytes compressed
72bytes uncompressed
you get the idea
-$mev-
11-08-2002, 08:55 PM
Yes... is this all theoretical though? I have compressed about 2mb and created 74mb on a floppy disk once with a program.. needless to say it didn't work and i ruined the floppy disk, the theory was there... if u get me. Make up some weekly programming challenges then.. I have a few on my site with my admin members but Mike was the main 1 around here that did it and he aint around now
Idbeholda
11-12-2002, 09:58 AM
That's probably because somewhere you ****ed up in either the decompression or compression routine. And yes, I have a working program that impliments this idea, i'll post the source for both the compression/decompression engine in a bit after I get done with class. The program will be posted by the end of the week on my site at http://www.geocities.com/idbeholda/list.html
Idbeholda
11-12-2002, 11:12 AM
Compresses in chunks of 8, 16, 32, 64, and 128 bytes, supports volume headers of approximately 11.3MB
ds contains 224 characters found on windows charactermap excluding the tab value (ascii9) which will be used as 0
ptn = ^
Compression Routine
x=1
do while x<len(dt.text)
c=mid(dt.text,x,ptn)
if ins(ch.text,c)=0 then ch.text=ch.text+c
x=x+ptn
loop
x=1
do while x<len(dt.text)
for y=1 to 4
bt(y)=chr(9)
next y
nm=ins(cm.text,mid(dt.text,x,ptn)
if nm>50076 then bt(4)=mid(ds,(nm\11317376)+1,1)
nm=nm-nm*(nm\113,16376)
if nm>226 then bt(3)=mid(ds,(nm\50076)+1,1)
nm=nm-nm*(nm\50076)
if nm>1 then bt(2)=mid(ds,(nm\226)+1,1)
nm=nm-nm*(nm\226)
bt(1)=mid(ds,(nm\1)+1,1)
hd.text=hd.text+bt(1)+bt(2)+bt(3)+bt(4)
x=x+ptn
loop
decompression routine
nme=mid(dt.text,3,val(mid(dt.text,1,2)))
lng=val(mid(dt.text,1,2))+3
'******************************
'*vbcrlf's first ascii character is ascii11*
'******************************
st=ins(dt.text,chr(11))
mng=val(mid(dt.text,mng,st)-lng)
ch.text=mid(dt.text,st+2,mng)
hd.text=mid(dt.text,st+3+mng,len(dt.text)-(st+2+lng))
dt.text=""
x=1
do while x<len(hd.text)
vl=((ins(ds,bt(1))+226(ins(ds,bt(1)) etc, etc 50076, 11316376
dt.text=dt.text+mid(cm.text.vl,ptn)
loop
there ya go with part of it, enjoy
-$mev-
11-12-2002, 07:13 PM
I didnt fu.ck up... lol.. fact is u cant compress 1.44mb --> 70mb and expect it to work.. it worked for about a second.. worth a floppy disk and an experiment.. i usually compressed alot of the old 1-2gb hard drives to a fairly substancial amount.. if i get chance outta work i'll try it.. coming up to christmas though so work, work, work.
vBulletin v3.5.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.