Code Comments
Programming Forum and web based access to our favorite programming groups.Creation of the "Down Pillow" Compression Algorithm Control Codes: Step 15 of 88 I am posting a series of steps to comp.compression so that there can be an external record of my efforts to create a sucessful copy of control codes to use in the "Down Pillow" compression algorithm as discussed earlier this year. Erik T. Evenson ==================================== Step 15 of 88 The output file dpc11_02.dat from the eleventh step needs to be separated. The group number listing is divided into three parts with each part having only those group numbers that belong in the same pile. The random ordering of the groups is left alone. The file dpc11_02.dat must be in the working directory. The following QBASIC program creates dpc15_01.dat, dpc15_02.dat, and dpc15_03.dat as output files. ------------------------------------ REM QBASIC program: COLLATE.BAS REM This program separates the group ' number listing in dpc11_02.dat ' into three parts based on which ' independent pile each group ' number belongs. The random order ' is maintained for each part. OPEN "I", #1, "dpc11_02.dat" OPEN "O", #2, "dpc15_01.dat" CLOSE #2 OPEN "O", #2, "dpc15_02.dat" CLOSE #2 OPEN "O", #2, "dpc15_03.dat" CLOSE #2 10 IF EOF(1) THEN GOTO 30 INPUT #1, a$ LET a& = VAL(a$) IF a& < 393217 THEN GOSUB 300 IF a& < 262145 THEN GOSUB 200 IF a& < 131073 THEN GOSUB 100 LET a1$ = SPACE$(10) RSET a1$ = a$ PRINT #2, a1$ GOTO 10 30 CLOSE END 100 CLOSE #2 OPEN "A", #2, "dpc15_01.dat" RETURN 200 CLOSE #2 OPEN "A", #2, "dpc15_02.dat" RETURN 300 CLOSE #2 OPEN "A", #2, "dpc15_03.dat" RETURN ------------------------------------ More to come.
Post Follow-up to this messageOn 9 Oct 2004 12:44:53 -0700, evenuscinatus@yahoo.com (Plato777) wrote: >Creation of the "Down Pillow" >Compression Algorithm Control >Codes: Step 15 of 88 How do you know it's going to take 88 steps? Jim
Post Follow-up to this messageJim <spam@ihug.com.au> writes: > On 9 Oct 2004 12:44:53 -0700, evenuscinatus@yahoo.com (Plato777) > wrote: > > > How do you know it's going to take 88 steps? Because it originally took 176 steps and he gets 2:1 compression. Phil -- They no longer do my traditional winks tournament lunch - liver and bacon. It's just what you need during a winks tournament lunchtime to replace lost ... liver. -- Anthony Horton, 2004/08/27 at the Cambridge 'Long Vac.'
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.