home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-03-02 | 1.0 KB | 50 lines |
- '*********************************************
- '* Pack.AMOS *
- '* �1992 by Volker Stepprath *
- '* Crunched and saved a file in dataformat *
- '*********************************************
- '
- '**** Choose file ****
- '
- FILE$=Fsel$("","","Please choose file to pack !","")
- '
- If FILE$<>""
- '
- '**** Get length of file ****
- '
- Open In 1,FILE$
- L=Lof(1)
- Close 1
- '
- '**** Reserve memory ****
- '
- Reserve As Work 7,L
- '
- '**** Load file ****
- '
- Bload FILE$,7
- '
- '**** Crunch file ****
- '
- C= Extension_5_00CE(Start(7),L,-1,512,0)
- '
- '**** Write back file ****
- '
- If C>0
- Print "Normal length:"+Str$(L)
- Print "Packed length:"+Str$(C)
- Print "Gained.......:"+Str$(100-(100*C)/L)+"% ="+Str$(L-C)+" bytes"
- FILE$=Fsel$("","","Please choose file to save","the packed datas !")
- If FILE$<>""
- Bsave FILE$,Start(7) To Start(7)+C
- End If
- End If
- '
- '**** Erase reserved memory ****
- '
- Erase 7
- '
- End If
- '
- Wait 50
- Edit