For Programmers: Free Programming Magazines  


Home > Archive > Compression > October 2004 > "Down Pillow" Control Code Creation: Step 14 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 14 of 88
Plato777

2004-10-03, 3:55 pm

Creation of the "Down Pillow"
Compression Algorithm Control
Codes: Step 14 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 14 of 88

The binomial frequency listing of
step ten has to be relisted
excluding some of the 3,4 and
5 index numbers to account for
the prearrangement section of the
XOR group listings.

Make sure that DPC10_02.DAT file
is in the working directory.
The output data of the following
program is labeled DPC14_01.DAT.


---------------------------------------
REM QBASIC Program: BINOMEXC.BAS
REM This program relists the
' binomial frequency data
' excluding some data that
' is needed to prearrange
' some of the XOR groups in
' another step.
' The file DPC10_02.DAT must
' be in the working directory.

DIM a(3, 3)

a(1, 1) = 0: a(1, 2) = 0: a(1, 3) = 0
a(2, 1) = 0: a(2, 2) = 0: a(2, 3) = 0
a(3, 1) = 0: a(3, 2) = 0: a(3, 3) = 0

OPEN "I", #1, "DPC10_02.DAT"
OPEN "O", #2, "DPC14_01.DAT"

FOR b& = 1 TO 393216
LET g = 0
IF EOF(1) GOTO 30
LINE INPUT #1, c$
LET c = VAL(c$)
IF c = 3 THEN GOSUB 100
IF c = 4 THEN GOSUB 100
IF c = 5 THEN GOSUB 100
IF g = 1 THEN GOTO 6
5 PRINT #2, c$
6 NEXT b&

30 CLOSE
END

100 REM subroutine
IF c = 3 THEN LET e = 136
IF c = 3 THEN LET f = 1
IF c = 4 THEN LET e = 170
IF c = 4 THEN f = 2
IF c = 5 THEN LET e = 34
IF c = 5 THEN f = 3
IF b& < 393217 THEN LET d = 3
IF b& < 262145 THEN LET d = 2
IF b& < 131073 THEN LET d = 1
IF a(d, f) = e THEN RETURN
LET a(d, f) = a(d, f) + 1
LET g = 1
RETURN
----------------------------------

More to follow.
Sponsored Links







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

Copyright 2008 codecomments.com