For Programmers: Free Programming Magazines  


Home > Archive > Compression > October 2004 > "Down Pillow" Control Code Creation: Step 15 of 88









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author "Down Pillow" Control Code Creation: Step 15 of 88
Plato777

2004-10-09, 3:55 pm

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.
Jim

2004-10-11, 8:55 pm

On 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
Phil Carmody

2004-10-12, 8:55 am

Jim <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.'
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com