Code Comments
Programming Forum and web based access to our favorite programming groups.Creation of the "Down Pillow" Compression Algorithm Control Codes: Step 13 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 13 of 88 The group listing file created in step 12 has to be relisted excluding those group numbers selected by random in step 11. Run the following QBASIC program with DPC12_01.DAT and DPC11_02.DAT in the working directory. The output file DPC13_01.DAT is created by the program. ------------------------------------- REM QBASIC Program: GROUPXPL.BAS REM This program relists the groups ' in DPC12_01.DAT excluding those ' groups chosen randomly in step 11, ' as listed in DPC11_02.DAT. ' The new group list file is given ' the name DPC13_01.DAT. OPEN "R", #1, "GROUPSEL.DAT", 1 FIELD #1, 1 AS a$ FOR b& = 1 TO 393216 GET #1, b& LSET a$ = CHR$(0) PUT #1, b& NEXT b& OPEN "I", #2, "DPC11_02.DAT" FOR b = 1 TO 1020 LINE INPUT #2, c$ LET c& = VAL(c$) GET #1, c& LSET a$ = CHR$(1) PUT #1, c& NEXT b REM start of routine CLOSE #2 OPEN "I", #2, "DPC12_01.DAT" OPEN "O", #3, "DPC13_01.DAT" 15 REM start of routine IF EOF(2) THEN GOTO 30 LINE INPUT #2, d$ LET d& = VAL(d$) GET #1, d& LET a = ASC(a$) IF a = 1 THEN GOTO 15 PRINT #3, d$ GOTO 15 30 CLOSE SHELL "ERASE GROUPSEL.DAT" END ---------------------------------- More to follow.
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.