Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

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

Use the QBASIC program supplied below.

An index ascii list file is created showing
what groups are needed to isolate certain
label elements. The format is as follows:

[space]
label id
group #1 id
group #2 id
group #3 id
group #4 id
group #5 id
group #6 id
group #7 id
group #8 id
group #9 id
group #10 id

Use this information to find the
bit [label id] by XORing together
all the group id bits.

A database is also created that will be
used to reformat the random label
listing file to exclude those labels used
in the special subgroup mapping in the
previous step.

Make sure the file dpc16_01.dat is located
in the working directory when running the
program.  The program creates the files
dpc17_01.dat and dpc17_02.dat.

-----------------------------------------
REM QBASIC program: STEP17.BAS
REM This program creates an
'   index file that lists which
'   groups are needed to isolate
'   certain label elements.
'   Also, a database is created
'   which is needed to reformat
'   the randomized label listing
'   created in a previous step.
'   Make sure the file dpc16_01.dat
'   is located in the working
'   directory.  The program creates
'   the files dpc17_01.dat and
'   dpc17_02.dat.

OPEN "R", #1, "dpc16_01.dat", 27
FIELD #1, 2 AS a1$, 10 AS a2$, 3 AS a3$, 10 AS a4$, 2 AS a5$
OPEN "O", #2, "dpc17_01.dat"
OPEN "R", #3, "dpc17_02.dat", 3
FIELD #3, 1 AS d1$, 1 AS d2$, 1 AS d3$
LET f$ = CHR$(0): LET h$ = CHR$(1)
FOR e& = 1 TO 1048576
GET #3, e&
LSET d1$ = f$: LSET d2$ = f$: LSET d3$ = f$
PUT #3, e&
NEXT e&
FOR b = 1 TO 3774
LET g = 0
GET #1, b
LET a2& = VAL(a2$): LET a4& = VAL(a4$)
IF a2& < 393217 THEN LET g = 3
IF a2& < 262145 THEN LET g = 2
IF a2& < 131073 THEN LET g = 1
GET #3, a4&
IF g = 1 THEN LSET d1$ = h$
IF g = 2 THEN LSET d2$ = h$
IF g = 3 THEN LSET d3$ = h$
PUT #3, a4&
LET c = ((b - 1) MOD 37) + 1
IF c = 5 THEN GOSUB 100
IF c = 6 THEN GOSUB 200
IF c = 10 THEN GOSUB 200
IF c = 14 THEN GOSUB 200
IF c = 18 THEN GOSUB 200
IF c = 22 THEN GOSUB 200
IF c = 26 THEN GOSUB 200
IF c = 29 THEN GOSUB 200
IF c = 32 THEN GOSUB 200
IF c = 35 THEN GOSUB 200
NEXT b
CLOSE
END
100 PRINT #2,
PRINT #2, a4$: PRINT #2, a2$
RETURN
200 PRINT #2, a2$
RETURN
REM End of Program
------------------------------------------

More to follow.

Report this thread to moderator Post Follow-up to this message
Old Post
Plato777
10-14-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Compression archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:56 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.