BBS: Inland Empire Archive Date: 08-05-92 (03:26) Number: 143 From: RICH GELDREICH Refer#: NONE To: ROBERT CHURCH Recvd: NO Subj: Re:text Mode Cursor Conf: (2) Quik_Bas
> That should solve all of the problems people have been having. How do
> you get it down to six bits per character instead of eight? Just
> curious...
>
Well, lets say we want to encode 3 characters from the input file.
That's 8*3 or 24 bits all together. Since we can use 6 bits per
character, each posted character will look something like this:
Origonal 01234567 01234567 01234567
Posted 01234501 23450123 45012345
See? For every 3 bytes inputted, the encoder outputs 4.
BIN2QB 3.3 uses this scheme to encode its output, much like my PostIt!
program. BTW- Even though the two programs use the same scheme, there
are many differences between the two loaders. BIN2QB gets 4 bytes at a
time, and then spits out 3. My program uses a much different technique
that GIF decoders use- a much faster(and smaller) algorithm.
To translate the 6 bit number into something postable, this can be used:
T$="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789()"
Byte$=MID$(T$,Number+1,1)
To untranslate it:
Number=INSTR(T$,Byte$)-1
Simple?
Rich
--- RBBSMAIL 17.2A
* Origin: Computer Co-Op RBBS HST, 609-784-9404 Voorhees
NJ (RBBS-PC 1:266/29)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET