C64 Software  <  SCA: The C64 Software Collection / COMPACTOR

  Run
0 :
10 Q=16384:FORI=7922TO16383:A=PEEK(I):B=PEEK(I+1):C=PEEK(I+2)
20 IFA=0THENIFB=0THEN100
30 IFA=BTHENIFC=BTHEN200
40 IFA=191THENPOKEQ,207:Q=Q+1:POKEQ,1:Q=Q+1:GOTO60
50 IFA=207THENPOKEQ,A:Q=Q+1:POKEQ,1:Q=Q+1
60 POKEQ,A:Q=Q+1:NEXT:PRINT""Q:END
100 POKEQ,191:Q=Q+1:Z=1
110 IFPEEK(I+Z)=0THENIFZ<255THENZ=Z+1:GOTO110
120 I=I+Z−1:A=Z:GOTO60
200 POKEQ,207:Q=Q+1:Z=1
210 IFPEEK(I+Z)=ATHENIFZ<255THENZ=Z+1:GOTO210
220 I=I+Z−1:POKEQ,Z:Q=Q+1:GOTO60
READY.