Code Comments
Programming Forum and web based access to our favorite programming groups.Creation of the "Down Pillow" Compression Algorithm Control Codes: Step 18 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 18 of 88 The label listing in dpc10_01.dat must be relisted to exclude those labels used to create the special pre-arrangement groups in step 16. Make sure the label listing file dpc10_01.dat and the database file dpc17_02.dat are located in the working directory when running the following QBASIC program. The program creates the new label listing file dpc18_01.dat. --------------------------------------- REM QBASIC program: STEP18.BAS REM This program relists the label ' listing in dpc10_01.dat to exclude ' those labels used in the special ' group pre-arrangement in step 16. ' Make sure the files dpc10_01.dat and ' dpc17_02.dat are located in the ' working directory. The program ' creates the output file dpc18_01.dat. OPEN "I", #1, "dpc10_01.dat" OPEN "R", #2, "dpc17_02.dat", 3 FIELD #2, 1 AS a1$, 1 AS a2$, 1 AS a3$ OPEN "O", #3, "dpc18_01.dat" LET d = 1 10 IF EOF(1) THEN GOTO 30 LINE INPUT #1, b$ IF d < 3145729 THEN LET e = 3 IF d < 2097153 THEN LET e = 2 IF d < 1048577 THEN LET e = 1 LET b& = VAL(b$) GET #2, b& IF e = 3 THEN LET f$ = a3$ IF e = 2 THEN LET f$ = a2$ IF e = 1 THEN LET f$ = a1$ IF f$ = CHR$(0) THEN GOTO 20 IF f$ = CHR$(1) THEN GOTO 25 20 PRINT #3, b$ 25 LET d = d + 1 GOTO 10 30 CLOSE END ---------------------------------------- More to follow.
Post Follow-up to this messagePlato777 wrote: > Creation of the "Down Pillow" > Compression Algorithm Control > Codes: Step 18 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 18 of 88 > > The label listing in dpc10_01.dat must > be relisted to exclude those labels used > to create the special pre-arrangement > groups in step 16. Make sure the label > listing file dpc10_01.dat and the > database file dpc17_02.dat are located > in the working directory when running > the following QBASIC program. The > program creates the new label listing > file dpc18_01.dat. > > --------------------------------------- > REM QBASIC program: STEP18.BAS > REM This program relists the label > ' listing in dpc10_01.dat to exclude > ' those labels used in the special > ' group pre-arrangement in step 16. > ' Make sure the files dpc10_01.dat and > ' dpc17_02.dat are located in the > ' working directory. The program > ' creates the output file dpc18_01.dat. > OPEN "I", #1, "dpc10_01.dat" > OPEN "R", #2, "dpc17_02.dat", 3 > FIELD #2, 1 AS a1$, 1 AS a2$, 1 AS a3$ > OPEN "O", #3, "dpc18_01.dat" > LET d = 1 > 10 IF EOF(1) THEN GOTO 30 > LINE INPUT #1, b$ > IF d < 3145729 THEN LET e = 3 > IF d < 2097153 THEN LET e = 2 > IF d < 1048577 THEN LET e = 1 > LET b& = VAL(b$) > GET #2, b& > IF e = 3 THEN LET f$ = a3$ > IF e = 2 THEN LET f$ = a2$ > IF e = 1 THEN LET f$ = a1$ > IF f$ = CHR$(0) THEN GOTO 20 > IF f$ = CHR$(1) THEN GOTO 25 > 20 PRINT #3, b$ > 25 LET d = d + 1 > GOTO 10 > 30 CLOSE > END > ---------------------------------------- > > More to follow. With all the opening and closing of files throughout your little ordeal, I bet your hard drive is wishing it had a few aspirins.
Post Follow-up to this messagePlato777 wrote: > Creation of the "Down Pillow" > Compression Algorithm Control > Codes: Step 18 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 18 of 88 > > The label listing in dpc10_01.dat must > be relisted to exclude those labels used > to create the special pre-arrangement > groups in step 16. Make sure the label > listing file dpc10_01.dat and the > database file dpc17_02.dat are located > in the working directory when running > the following QBASIC program. The > program creates the new label listing > file dpc18_01.dat. > > --------------------------------------- > REM QBASIC program: STEP18.BAS > REM This program relists the label > ' listing in dpc10_01.dat to exclude > ' those labels used in the special > ' group pre-arrangement in step 16. > ' Make sure the files dpc10_01.dat and > ' dpc17_02.dat are located in the > ' working directory. The program > ' creates the output file dpc18_01.dat. > OPEN "I", #1, "dpc10_01.dat" > OPEN "R", #2, "dpc17_02.dat", 3 > FIELD #2, 1 AS a1$, 1 AS a2$, 1 AS a3$ > OPEN "O", #3, "dpc18_01.dat" > LET d = 1 > 10 IF EOF(1) THEN GOTO 30 > LINE INPUT #1, b$ > IF d < 3145729 THEN LET e = 3 > IF d < 2097153 THEN LET e = 2 > IF d < 1048577 THEN LET e = 1 > LET b& = VAL(b$) > GET #2, b& > IF e = 3 THEN LET f$ = a3$ > IF e = 2 THEN LET f$ = a2$ > IF e = 1 THEN LET f$ = a1$ > IF f$ = CHR$(0) THEN GOTO 20 > IF f$ = CHR$(1) THEN GOTO 25 > 20 PRINT #3, b$ > 25 LET d = d + 1 > GOTO 10 > 30 CLOSE > END > ---------------------------------------- > > More to follow. Also, here's a suggestion for any ideas you may have in the future... start one thread, and reply to the one thread with added information (instead of creating 88 different threads). Another note, instead of 88 different steps... why don't you create ONE program and use different Subs & Functions, opening all the files you need at one instance, and actually assign arrays in memory to use as working buffers. It'd not ONLY be MUCH more efficient, but it'd stop the confusion of trying to place together 88 different pieces of a puzzle. Then again, I think that's what you're going after... isn't it? Confusion? Because otherwise, I don't see why you can't simply wait to construct a single working compressor/decompressor! Also, I know you're going for a "small sized" approach, but QBasic? Newsflash, it's not 1987 any longer... (then again, from your funding plea post... perhaps that's all your computer will run). What's your expected throughput on operations of this project? 100 bytes per minute?
Post Follow-up to this message"Eric D. Brown" <nospam@nowhere.com> wrote in message news:<10n2t269o539peb@corp.supernews. com>... > Plato777 wrote: > > With all the opening and closing of files throughout your little ordeal, > I bet your hard drive is wishing it had a few aspirins. Hard drive? What hard drive? Can you say R A M D I S K . EE.
Post Follow-up to this message"Eric D. Brown" <nospam@nowhere.com> wrote in message news:<10n2trj6pmf5657@ corp.supernews.com>... > Also, here's a suggestion for any ideas you may have in the future... > start one thread, and reply to the one thread with added information > (instead of creating 88 different threads). Too confusing if someone has something to say about a certain step. Furthermore, the thread may become very long. > > Another note, instead of 88 different steps... why don't you create ONE > program and use different Subs & Functions, opening all the files you > need at one instance, and actually assign arrays in memory to use as > working buffers. It'd not ONLY be MUCH more efficient, but it'd stop > the confusion of trying to place together 88 different pieces of a > puzzle. Then again, I think that's what you're going after... isn't it? > Confusion? Because otherwise, I don't see why you can't simply wait > to construct a single working compressor/decompressor! I would have to determine all steps before I can do that. Posting step by step will keep me honest and will force me to address any mistakes or obstacles that come my way. I just want to remind people that Creation can be just as messy as Destruction. Chaos must precede Order. > > Also, I know you're going for a "small sized" approach, but QBasic? > Newsflash, it's not 1987 any longer... (then again, from your funding > plea post... perhaps that's all your computer will run). What's your > expected throughput on operations of this project? 100 bytes per minute? Qbasic is so simple to learn and implement. If my algorithm is successful I want everyone to make a copy if they want one. 100 Bytes/min?, perhaps. However, if my algorithm works the compression work can be split between 1M computers--Parallel processing. The beta-buffer is composed of 1048576 differently computable alpha-buffer p arts. EE.
Post Follow-up to this message"Eric D. Brown" <nospam@nowhere.com> wrote in message news:10n2trj6pmf5657@corp.supernews.com... > Another note, instead of 88 different steps... why don't you create ONE > program and use different Subs & Functions, opening all the files you > need at one instance, and actually assign arrays in memory to use as > working buffers. It'd not ONLY be MUCH more efficient, but it'd stop > the confusion of trying to place together 88 different pieces of a > puzzle. Then again, I think that's what you're going after... isn't it? > Confusion? Because otherwise, I don't see why you can't simply wait > to construct a single working compressor/decompressor! If he did that, it would be too obvious that his program doesn't work. -- Matt Mahoney
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.