home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
compress
/
filearchivers
/
lhsfx
/
lhsfx_doc
< prev
next >
Wrap
Text File
|
1995-02-27
|
14KB
|
390 lines
-------------------------------------------
LhSFX - Self Extracting Archive Creator
Original program written by Mike Kennedy
Cruncher and Decruncher © by
Holger P. Krekel & Olaf `Olsen' Barthel
Improved by Ralf Thanner in 91/92
req.library © by C.W. Fox & Bruce Dawson
-------------------------------------------
Version 1.5 04/11/92
To use all features of LhSFX the 'req.library' should be installed!
----------------------------------------------------------------------
Have you ever wanted to create a self-extracting archive? They make
life much easier for software developers and provide protection from
bogus copies of your precious work. LHSFX allows you to create your
own self-extracting archives... with data compression better than ZIP
and LHARC.
LHSFX uses compression an improved version of the LHARC compression
algorithm which allows an speed increase of over 40% and 3% better
compression. Decompression is almost incomparable... Apples to
Oranges... Usually around 500% faster. On small files the increased
compression may not be apparent because the extraction header is a
little over 2k long.
Here are some comparisons between LHSFX, LHARC and other packer....
1. Picture, 320x256, (32 colours), hand-drawn, 1 pixel = 1 byte
---------------------------------------------------------------
Input length in bytes: 81920
Output Compression Decompression
-------------------------------------
Lh(sfx) 11838 01:56 00:01
LhArcA 11849 02:04 00:10
The Imploder 13076 01:41 00:01
PowerPacker 14868 00:30 00:01
2. Picture, 320x256, (32 colours), hand-drawn, bitplanes
--------------------------------------------------------
Input length in bytes: 51200
Output Compression Decompression
-------------------------------------
Lh(sfx) 13870 01:27 00:02
LhArcA 14041 02:40 00:10
The Imploder 15342 02:40 00:01
PowerPacker 15840 00:27 00:01
3. Picture, 640x400, (16 colours), sampled, 1 pixel = 1 byte
------------------------------------------------------------
Input length in bytes: 256000
Output Compression Decompression
-------------------------------------
Lh(sfx) 76428 03:01 00:06
LhArcA 77970 04:05 00:38
The Imploder 93152 09:12 00:08
PowerPacker 90728 02:20 00:08
4. Picture, 640x400, (16 colours), sampled, bitplanes
-----------------------------------------------------
Input length in bytes: 128000
Output Compression Decompression
-------------------------------------
Lh(sfx) 81886 01:02 00:09
LhArcA 81580 01:42 00:44
The Imploder 93152 09:12 00:02
PowerPacker 86956 01:52 00:06
5. Executable file, Amiga-hunk format
-------------------------------------
Input length in bytes: 130964
Output Compression Decompression
-------------------------------------
Lh(sfx) 71330 01:07 00:08
LhArcA 77970 01:48 00:34
The Imploder 73172 08:23 00:03
PowerPacker 74208 01:40 00:06
LHSFX is easy to use. Once you've started it, enter the name of the
archive you want to create. It will check to see whether it exists
and if it does, it will ask you if you'd like to overwrite it. Then
begin entering names of files you want compressed. If you want a text
file to be displayed while the archive is being extracted, enter it's
name and press D for Display at the prompt. Otherwise, press F for
File. For files, enter the extract path, in other words the name of
the file when it is decrunched, including names of subdirectories.
Here's an example...
When you don't have the 'req.library' in your LIBS: drawer LHsfx will
use a Shell-interface. Here you must enter the extract path and the
file name for each crunched file! The req.library version will always
take the original file name and the extract path has to be declared
only once.
The 'Extract path' and the filename together _must_ not be longer than
48 chars.
=========================================================================
ARCHIVE NAME > ram:testfile ['.sfx' will be added automagically]
ORIGINAL > df0:info.txt
»> df0:info.txt (1234 bytes)
Compressing... Please Wait.
Crunched 1234 bytes to 374 bytes.
[F]ile or [D]isplay : D
File Added to Archive.
ORIGINAL > df0:program
»> df0:program (4321 bytes)
Compressing... Please Wait.
Crunched 4321 bytes to 1342 bytes.
[F]ile or [D]isplay : F
Extract Path > ram:and_the_extract_name
File Added To Archive.
ORIGINAL > another file or EXIT [quits program]
=========================================================================
To close off and finish an archive just press return at an empty
ORIGINAL prompt. LHSFX will then complete and close your archive. It
is now a fully self-contained, self-extracting archive. To extract
the above archive, all you'd type 'testfile.sfx' at the Shell prompt.
> Mike Kennedy <
> 140 Westside Dr. < Because he wrote a program with a lousy
> Oakville, Ontario < interface, many bugs and a stolen cruncher
> Canada L6K 1P3 < send donations ($10) to the address below:
=========================================================================
Send suggestions and registration fees to:
Olaf 'Olsen' Barthel
Brabeckstrasse 35
D-3000 Hannover 71
Federal Republic of Germany
=========================================================================
CHANGES
=========================================================================
V1.1 - window bug fixed by 'FLASH of TRSI'.
-------------------------------------------------------------------------
LHSFX V1.1 was the version I got, but the guy 'FLASH' wrote in his
docs that LHSFX did not work correct under Kickstart 1.3 and the only
thing he patched was the bug in the 'window open' routine.
-------------------------------------------------------------------------
V1.2 28/05/91 [INTERNAL]
- added filerequester of req.library!
(if you don't have the req.lib you must type the name.-(
- removed screen color cycle during crunch.
- tried to improve the code a little bit!
( fixed bugs, added file req., made it more multitasking
friendly and the code is still shorter! )
- changed: DESTINATION > ram:testfile
to ARCHIVE NAME > ram:testfile
- changed: 'Press Left Mouse Button'
to 'Press RIGHT Mouse Button' for DMOUSE user!
-------------------------------------------------------------------------
V1.3 14/06/91 [INTERNAL]
- the filerequester is now also used for 'ARCHIV NAME' and
'EXTRACT PATH'.
- short instructions at the beginning. ( only with req.lib. )
- '.SFX' will be added automagically to archiv name.
- added led-cycling during crunch. ( is he still crunching?? )
( In a multitasking system i prefer something more subtil than
a flashing screen. )
- added requester for '[F]ile' or '[D]isplay' choice.
- 'CON' and 'ANSI' part thrown out.
( filelenght reduced from 18kb to 9kb! )
-------------------------------------------------------------------------
V1.4 22/10/91 [INTERNAL]
- added requester for 'Overwrite [Y]es / [N]o' decision.
- removed some of my own bugs.
- the 'EXTRACT PATH' has only to be declared once.
-------------------------------------------------------------------------
V1.5 03/11/92 Public release
- rewrote part of the code and removed bugs.
- changed TASKPRI during crunch from '0' to '+8'.
- rewrote the doc;-)
=========================================================================
»»» All changes done by RALF THANNER in 91/92 «««
=========================================================================
**** COMMENT ****
=========================================================================
Normally I don't like to snoop around in other programs, but in this
case it was something different. This Lhsfx was just the program I
needed and always wanted to write myself. There was only one thing
that I didn't like and that was the lousy `interface'.
So I decided to add a filerequester. When I was snooping around in
the code, I noticed two entirely different programming styles: One was
close to brilliant and the other was less than lousy! After a short
time of modifing the source I thought to myself: I cannot believe
that Mike has written the cruncher. He seems to be a beginner (don't
take it too hard Mike, I also wrote such kind of code at the
beginning) and the cruncher was one of the best pieces of code I have
ever seen.
Then I remembered that about one year ago two friends of mine had
written an LZH cruncher/decruncher. Holger Krekel needed about one
month to improve and speed up the code for the MC68000. At least it
was one of the best LZHUF cruncher available. Together with Olaf
`Olsen' Barthel he released the lh.library as shareware, requiring
explicit permission to use it in shareware and commercial programs --
great surprise!!! I remembered that Olaf had handed me the source, so
I started to compare the code of Lhsfx and lh.library:
THEY ARE BYTE BY BYTE IDENTICAL!
It's theft to release a programm as shareware if the only achievement
is a lousy CLI-interface and the main piece of the cake (the cruncher)
is stolen! Mike, I hope that you will have a good explanation for
this!
The reason why this progamm is released one year later when there are
better and faster programms available (LHAsfx) is simple! I had spent
many hours improving the code and the only reason why it was not
released last year was the fact that I forgot this program on one of
my source backup disks.
But last week I found the source, remembered that this proggy never
reached the public, rewrote some parts of the code and voila... here
it is!
Some examples of Lhsfx code
---------------------------
This code is not shown to humble Mike, but to make clear how surprised
I was when I compared the different styles between the cruncher and
the rest of the program. The first three examples are from Mike and
the fifth from MXM. Have a look on your own...
This code was thrown out by 'RESOURCE V4.0' a great tool for programmer.
* EXAMPLE #1 * MIKE
----
MOVE.L D0,lbL000DA8 ; what about : Move.l d0,xxx-var(a5)
MOVE.L lbL000DB0,D2 ; and : move.l xxx(pc),d2
MOVE.L lbL000DB8,D3 ;
MOVE.L lbL000C90,A6 ; 'how to get huge reloc hunks!'
* EXAMPLE #2 *
MOVE.L D0,lbL000CA0 ; what about : Move.l d0,xxx-var(a5)
MOVE.L lbL000CA0,D1 ; and : move.l d0,d1
* EXAMPLE #3 *
lbC000612
BTST #6,$BFE001 ; what about adding a DOS-DELAY for
BNE lbC000612 ; a minimum of multi-tasking?
* EXAMPLE #5 * Original (part of cruncher)
-------- (comments taken from source)
;**** 1. Current node = last node ***
move 0(a5,d5.w),0(a5,d0.w) ;dad(r) = dad(p)
move 0(a3,d5.w),0(a3,d0.w) ;lson(r)=lson(p)
move 0(a4,d5.w),0(a4,d0.w) ;rson(r)=rson(p)
;**** 2. Put parent node into last node. ***
move 0(a3,d5.w),d2 ;
move d0 ,0(a5,d2.w) ; dad(lson(p))=r
move 0(a4,d5.w),d2
move d0 ,0(a5,d2.w) ; dad(rson(p))=r
;**** 3. Put son of last node into current ***
;**** node. ***
move 0(a5,d5.w),d2
cmp 0(a4,d2.w),d5 ; IF rson(dad(p)) == p
==========================================================================
- LH -
A data compression system for the Commodore Amiga computer
written by Holger P. Krekel and Olaf 'Olsen' Barthel
© Copyright 1990, all rights reserved.
==========================================================================
******* Thanks for these versions ********
LZHUF.C English version 1.0
Based on Japanese version 29-NOV-1988
LZSS coded by Haruhiko OKUMURA
Adaptive Huffman Coding coded by Haruyasu YOSHIZAKI
Edited and translated to English by Kenji RIKITAKE
******* Many thanks to Olaf for knowledge and the above *******
******* sourcecodes *******
******* they were used to get to know some methods *******
***************************************************************
******* LZHUF Packing *******
******* written in assembly by HPK 24/08/90 for MXM *******
=========================================================================
Ralf Thanner
Ellerstr. 83
D-4000 Duesseldorf 1
Federal Republic of Germany
=========================================================================
EoD