=========================================================================== BBS: The Abacus * HST/DS * Potterville, MI Date: 06-08-93 (03:10) Number: 205 From: RICH GELDREICH Refer#: NONE To: VICTOR YIU Recvd: NO Subj: Prototype 1/3 Conf: (35) Quick Basi --------------------------------------------------------------------------- '______O_/__________________| SNIP |__________________\_O______ ' O \ | HERE | / O 'This file created by PostIt! v6.1. '>>> Start of page 1. 'Hi Victor! The following prototype creates the most advanced PostIt! 'script we've ever developed! It has the following features: '1. Maximum filesize of 150k! '2. VERY efficient encoding algorithm- much better than PostIt's ' simple 6 bit scheme. '3. A fast and simple decoding algorithm makes extraction very fast. ' (I'm thinking about making an assembly decoder for it, since it's ' so simple.) ' 'I'd like to note that the encoding algorithm of this program is 'even more efficient than Coridon Henshaw's BT8 encoder. It's also 'many times faster, too! ' 'I know you're busy because of those damn tests and all of your other 'projects, but if you incorporated all of the features of PostIt! 6.1 'with the features of this script and we would have one hell of a 'program. ' DEFINT A-Z DECLARE SUB EmptyBucket () DECLARE SUB EncodeBlock () DECLARE SUB EncodeEnd () DECLARE SUB EncodeStart () DECLARE SUB PrintLine (A$) DECLARE SUB PrintScriptLine (A$) DIM SHARED I$ 'Input file's name DIM SHARED InputBuffer$, BytesRead 'Input buffer for fast reader DIM SHARED OutputLine$, OutputPos, LinesWritten 'Output buffer DIM SHARED NextSub, LinesInSub 'Current subroutine info 'Encoding vars DIM SHARED FlagScaler, CurrentFlag, Bucket(1 TO 4), CodesInBucket DIM BytesLeft AS LONG IF POS(0) <> 1 THEN PRINT PRINT "Yet Another PostIt! Prototype Script Encoder By Rich"+_ " Geldreich" INPUT "Input file"; I$ INPUT "Output file"; O$ OPEN I$ FOR BINARY AS #1 BytesLeft = LOF(1) IF BytesLeft = 0 THEN CLOSE KILL I$ PRINT I$; " wasn't found." END ELSEIF BytesLeft > (150 * 1024&) THEN CLOSE PRINT "Sorry, the input file must be less than 150k." END END IF OPEN O$ FOR OUTPUT AS #2 LEN = 4096 EncodeStart InputBuffer$ = SPACE$(4096) BytesRead = 4096 DO IF BytesLeft < 4096 THEN InputBuffer$ = SPACE$(BytesLeft) BytesRead = BytesLeft END IF GET #1, , InputBuffer$ EncodeBlock LOCATE , 1 PRINT LTRIM$(STR$(BytesLeft)); " bytes remaining "; BytesLeft = BytesLeft - BytesRead LOOP WHILE BytesLeft EncodeEnd LOCATE , 1 '>>> Continued on page 2 --- MsgToss 2.0b * Origin: Computer Co-Op - Voorhees, NJ | Ted Hare (1:266/29) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/110 159/100 125 430 575 950 203/23 209/209 SEEN-BY: 261/1023 280/1 390/1 396/1 15 397/2 2230/100 2440/5 3603/20