home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / compress / filearchivers / lhsfx / lhsfx_doc < prev    next >
Text File  |  1995-02-27  |  14KB  |  390 lines

  1.  
  2.              -------------------------------------------
  3.                LhSFX - Self Extracting Archive Creator
  4.                Original program written by Mike Kennedy
  5.  
  6.                      Cruncher and Decruncher © by
  7.                Holger P. Krekel & Olaf `Olsen' Barthel
  8.               
  9.                   Improved by Ralf Thanner in 91/92
  10.  
  11.               req.library  © by C.W. Fox & Bruce Dawson
  12.              -------------------------------------------
  13.  
  14.  
  15.                        Version 1.5    04/11/92
  16.  
  17.  
  18.  
  19. To  use all features of LhSFX the  'req.library'  should be installed!
  20. ----------------------------------------------------------------------
  21.  
  22. Have  you  ever wanted to create a self-extracting archive?  They make
  23. life  much  easier for software developers and provide protection from
  24. bogus  copies  of your precious work.  LHSFX allows you to create your
  25. own self-extracting archives...  with data compression better than ZIP
  26. and LHARC.
  27.  
  28. LHSFX  uses  compression  an improved version of the LHARC compression
  29. algorithm  which  allows  an  speed increase of over 40% and 3% better
  30. compression.   Decompression  is  almost  incomparable...   Apples  to
  31. Oranges...   Usually around 500% faster.  On small files the increased
  32. compression  may  not  be  apparent because the extraction header is a
  33. little over 2k long.
  34.  
  35. Here are some comparisons between LHSFX, LHARC and other packer....
  36.  
  37.  
  38.  
  39. 1. Picture, 320x256, (32 colours), hand-drawn, 1 pixel = 1 byte
  40. ---------------------------------------------------------------
  41. Input length in bytes: 81920
  42.  
  43.  
  44.                   Output   Compression  Decompression
  45.                 -------------------------------------
  46.                 Lh(sfx)      11838  01:56       00:01
  47.                 LhArcA       11849  02:04       00:10
  48.                 The Imploder 13076  01:41       00:01
  49.                 PowerPacker  14868  00:30       00:01
  50.  
  51.  
  52. 2. Picture, 320x256, (32 colours), hand-drawn, bitplanes
  53. --------------------------------------------------------
  54. Input length in bytes: 51200
  55.  
  56.  
  57.                   Output   Compression  Decompression
  58.                 -------------------------------------
  59.                 Lh(sfx)      13870  01:27       00:02
  60.                 LhArcA       14041  02:40       00:10
  61.                 The Imploder 15342  02:40       00:01
  62.                 PowerPacker  15840  00:27       00:01
  63.  
  64.  
  65. 3. Picture, 640x400, (16 colours), sampled, 1 pixel = 1 byte
  66. ------------------------------------------------------------
  67. Input length in bytes: 256000
  68.  
  69.  
  70.                   Output   Compression  Decompression
  71.                 -------------------------------------
  72.                 Lh(sfx)      76428  03:01       00:06
  73.                 LhArcA       77970  04:05       00:38
  74.                 The Imploder 93152  09:12       00:08
  75.                 PowerPacker  90728  02:20       00:08
  76.  
  77.  
  78. 4. Picture, 640x400, (16 colours), sampled, bitplanes
  79. -----------------------------------------------------
  80. Input length in bytes: 128000
  81.  
  82.  
  83.                   Output   Compression  Decompression
  84.                 -------------------------------------
  85.                 Lh(sfx)      81886  01:02       00:09
  86.                 LhArcA       81580  01:42       00:44
  87.                 The Imploder 93152  09:12       00:02
  88.                 PowerPacker  86956  01:52       00:06
  89.  
  90.  
  91. 5. Executable file, Amiga-hunk format
  92. -------------------------------------
  93. Input length in bytes: 130964
  94.  
  95.  
  96.                   Output Compression Decompression
  97.                 -------------------------------------
  98.                 Lh(sfx)      71330  01:07       00:08
  99.                 LhArcA       77970  01:48       00:34
  100.                 The Imploder 73172  08:23       00:03
  101.                 PowerPacker  74208  01:40       00:06
  102.  
  103.  
  104.  
  105.  
  106. LHSFX  is  easy to use.  Once you've started it, enter the name of the
  107. archive  you  want  to create.  It will check to see whether it exists
  108. and  if  it does, it will ask you if you'd like to overwrite it.  Then
  109. begin entering names of files you want compressed.  If you want a text
  110. file  to be displayed while the archive is being extracted, enter it's
  111. name  and  press  D for Display at the prompt.  Otherwise, press F for
  112. File.   For  files, enter the extract path, in other words the name of
  113. the  file  when  it  is decrunched, including names of subdirectories.
  114. Here's an example...
  115.  
  116. When you don't have the 'req.library' in your LIBS:  drawer LHsfx will
  117. use  a  Shell-interface.  Here you must enter the extract path and the
  118. file name for each crunched file!  The req.library version will always
  119. take  the  original  file name and the extract path has to be declared
  120. only once.
  121.  
  122. The 'Extract path' and the filename together _must_ not be longer than
  123. 48 chars.
  124.  
  125. =========================================================================
  126.  
  127.  ARCHIVE NAME > ram:testfile ['.sfx' will be added automagically]
  128.  
  129.  ORIGINAL > df0:info.txt
  130.  
  131.  »> df0:info.txt  (1234 bytes)
  132.  
  133.  Compressing... Please Wait.
  134.  
  135.  Crunched 1234 bytes to 374 bytes.
  136.  
  137.  [F]ile or [D]isplay : D
  138.  
  139.  File Added to Archive.
  140.  
  141.  ORIGINAL > df0:program
  142.  
  143.  »> df0:program  (4321 bytes)
  144.  
  145.  Compressing... Please Wait.
  146.  
  147.  Crunched 4321 bytes to 1342 bytes.
  148.  
  149.  [F]ile or [D]isplay : F
  150.  
  151.  Extract Path > ram:and_the_extract_name
  152.  
  153.  File Added To Archive.
  154.  
  155.  ORIGINAL > another file or EXIT  [quits program]
  156.  
  157. =========================================================================
  158.  
  159. To  close  off  and  finish  an  archive just press return at an empty
  160. ORIGINAL prompt.  LHSFX will then complete and close your archive.  It
  161. is  now  a  fully self-contained, self-extracting archive.  To extract
  162. the above archive, all you'd type 'testfile.sfx' at the Shell prompt.
  163.  
  164.  
  165.  >  Mike Kennedy       <     
  166.  >  140 Westside Dr.   <  Because he wrote a  program  with  a lousy
  167.  >  Oakville, Ontario  <  interface, many bugs and a stolen cruncher
  168.  >  Canada    L6K 1P3  <  send donations ($10) to the address below:
  169.  
  170.  
  171. =========================================================================
  172.  
  173.  
  174.              Send suggestions and registration fees to:
  175.  
  176.                         Olaf 'Olsen' Barthel
  177.                           Brabeckstrasse 35
  178.                          D-3000 Hannover 71
  179.  
  180.                      Federal Republic of Germany
  181.  
  182.  
  183. =========================================================================
  184.                               CHANGES
  185. =========================================================================
  186.  
  187.  
  188.  V1.1   - window bug fixed by 'FLASH of TRSI'.
  189.  
  190. -------------------------------------------------------------------------
  191.  
  192. LHSFX V1.1  was  the version I got, but the guy  'FLASH'  wrote in his
  193. docs that LHSFX did not work correct under Kickstart 1.3 and the  only
  194. thing he  patched was the bug in the 'window open' routine.
  195.  
  196. -------------------------------------------------------------------------
  197.  
  198.  V1.2   28/05/91        [INTERNAL]
  199.  
  200.      - added filerequester of req.library!
  201.        (if you don't have the req.lib you must type the name.-(
  202.  
  203.      - removed screen color cycle during crunch.
  204.  
  205.      - tried to improve the code a little bit!
  206.        ( fixed bugs, added file req., made it more multitasking
  207.          friendly and the code is still shorter! )
  208.  
  209.      - changed:        DESTINATION  > ram:testfile
  210.                 to     ARCHIVE NAME > ram:testfile
  211.  
  212.  
  213.      - changed:        'Press Left Mouse Button'
  214.                 to     'Press RIGHT Mouse Button' for DMOUSE user!
  215.  
  216. -------------------------------------------------------------------------
  217.  
  218.  V1.3   14/06/91        [INTERNAL]
  219.  
  220.      - the filerequester is now also used for 'ARCHIV NAME' and
  221.        'EXTRACT PATH'.
  222.  
  223.      - short instructions at the beginning. ( only with req.lib. )
  224.  
  225.      - '.SFX' will be added automagically to archiv name.
  226.  
  227.      - added led-cycling during crunch. ( is he still crunching?? )
  228.        ( In a multitasking system i prefer something more subtil than
  229.          a flashing screen. )
  230.  
  231.      - added requester for '[F]ile' or '[D]isplay' choice.
  232.  
  233.      - 'CON' and 'ANSI' part thrown out.
  234.        ( filelenght reduced from 18kb to 9kb! )
  235.  
  236. -------------------------------------------------------------------------
  237.  
  238.  V1.4   22/10/91        [INTERNAL]
  239.  
  240.      - added requester for 'Overwrite [Y]es / [N]o' decision.
  241.  
  242.      - removed some of my own bugs.
  243.  
  244.      - the 'EXTRACT PATH' has only to be declared once.
  245.  
  246. -------------------------------------------------------------------------
  247.  
  248.  V1.5   03/11/92        Public release
  249.  
  250.      - rewrote part of the code and removed bugs.
  251.  
  252.      - changed TASKPRI during crunch from '0' to '+8'.
  253.  
  254.      - rewrote the doc;-)
  255.  
  256. =========================================================================
  257.  
  258.          »»» All changes done by RALF THANNER in 91/92 «««
  259.  
  260. =========================================================================
  261.                           **** COMMENT ****
  262. =========================================================================
  263.  
  264. Normally  I  don't like to snoop around in other programs, but in this
  265. case  it  was  something different.  This Lhsfx was just the program I
  266. needed  and  always  wanted to write myself.  There was only one thing
  267. that I didn't like and that was the lousy `interface'.
  268.    So I decided to add a filerequester.  When I was snooping around in
  269. the code, I noticed two entirely different programming styles: One was
  270. close  to  brilliant and the other was less than lousy!  After a short
  271. time  of  modifing  the  source I thought to myself:  I cannot believe
  272. that  Mike has written the cruncher.  He seems to be a beginner (don't
  273. take  it  too  hard  Mike,  I  also  wrote  such  kind  of code at the
  274. beginning)  and the cruncher was one of the best pieces of code I have
  275. ever seen.
  276.    Then  I  remembered that about one year ago two friends of mine had
  277. written  an  LZH  cruncher/decruncher.  Holger Krekel needed about one
  278. month  to  improve and speed up the code for the MC68000.  At least it
  279. was  one  of  the  best  LZHUF cruncher available.  Together with Olaf
  280. `Olsen'  Barthel  he  released  the lh.library as shareware, requiring
  281. explicit  permission to use it in shareware and commercial programs --
  282. great surprise!!!  I remembered that Olaf had handed me the source, so
  283. I started to compare the code of Lhsfx and lh.library:
  284.  
  285.                    THEY ARE BYTE BY BYTE IDENTICAL!
  286.  
  287. It's  theft to release a programm as shareware if the only achievement
  288. is a lousy CLI-interface and the main piece of the cake (the cruncher)
  289. is  stolen!   Mike,  I  hope that you will have a good explanation for
  290. this!
  291.  
  292.  
  293. The reason why this progamm is released  one year later when there are
  294. better and faster programms available  (LHAsfx) is simple! I had spent
  295. many hours  improving  the code  and the  only reason  why  it was not
  296. released last  year was the fact that I forgot this  program on one of
  297. my source backup disks.
  298.  
  299. But last week I  found  the source,  remembered that this proggy never
  300. reached  the public, rewrote  some parts of the code and voila... here
  301. it is!
  302.  
  303.  
  304. Some examples of Lhsfx code
  305. ---------------------------
  306. This code is not shown to humble Mike, but to make clear how surprised
  307. I  was  when  I compared the different styles between the cruncher and
  308. the  rest  of the program.  The first three examples are from Mike and
  309. the fifth from MXM.  Have a look on your own...
  310.  
  311. This code was thrown out by 'RESOURCE V4.0' a great tool for programmer.
  312.  
  313. * EXAMPLE #1 *          MIKE
  314.                      ----
  315.      MOVE.L        D0,lbL000DA8  ; what about  : Move.l d0,xxx-var(a5)
  316.      MOVE.L        lbL000DB0,D2  ; and         : move.l xxx(pc),d2
  317.      MOVE.L        lbL000DB8,D3  ;
  318.      MOVE.L        lbL000C90,A6  ; 'how to get huge reloc hunks!'
  319.  
  320. * EXAMPLE #2 *
  321.  
  322.      MOVE.L        D0,lbL000CA0  ; what about  : Move.l d0,xxx-var(a5)
  323.      MOVE.L        lbL000CA0,D1  ; and         : move.l d0,d1
  324.  
  325. * EXAMPLE #3 *
  326.  
  327. lbC000612
  328.      BTST       #6,$BFE001       ; what about adding a DOS-DELAY for
  329.      BNE        lbC000612        ; a minimum of multi-tasking?
  330.  
  331.  
  332. * EXAMPLE #5 *     Original     (part of cruncher)
  333.                    --------  (comments taken from source)
  334.  
  335.  
  336.         ;**** 1. Current node = last node                ***
  337.  
  338.              move        0(a5,d5.w),0(a5,d0.w)        ;dad(r) = dad(p)
  339.              move        0(a3,d5.w),0(a3,d0.w)        ;lson(r)=lson(p)
  340.              move        0(a4,d5.w),0(a4,d0.w)        ;rson(r)=rson(p)
  341.  
  342.         ;**** 2. Put parent node into last node.        ***
  343.  
  344.  
  345.              move        0(a3,d5.w),d2                ;
  346.              move        d0        ,0(a5,d2.w)        ; dad(lson(p))=r
  347.              move        0(a4,d5.w),d2
  348.              move        d0        ,0(a5,d2.w)        ; dad(rson(p))=r
  349.  
  350.         ;**** 3. Put son of last node into current       ***
  351.         ;****    node.                                   ***
  352.      
  353.              move        0(a5,d5.w),d2
  354.              cmp         0(a4,d2.w),d5        ; IF rson(dad(p)) == p
  355.  
  356. ==========================================================================
  357.  
  358.                                - LH -
  359.      A data compression system for the Commodore Amiga computer
  360.         written by Holger P. Krekel and Olaf 'Olsen' Barthel
  361.                © Copyright 1990, all rights reserved.
  362.  
  363. ==========================================================================
  364.  
  365. ******* Thanks for these versions ********
  366.  LZHUF.C English version 1.0
  367.  Based on Japanese version 29-NOV-1988
  368.  LZSS coded by Haruhiko OKUMURA
  369.  Adaptive Huffman Coding coded by Haruyasu YOSHIZAKI
  370.  Edited and translated to English by Kenji RIKITAKE
  371.  
  372. ******* Many thanks to Olaf for knowledge and the above *******
  373. ******* sourcecodes                                     *******
  374. ******* they were used to get to know some methods      *******
  375. ***************************************************************
  376. ******* LZHUF Packing                                   *******
  377. ******* written in assembly by HPK 24/08/90 for MXM     *******
  378.  
  379.  
  380. =========================================================================
  381.  
  382.                            Ralf Thanner 
  383.                            Ellerstr. 83
  384.                         D-4000 Duesseldorf 1
  385.  
  386.                      Federal Republic of Germany
  387.  
  388. =========================================================================
  389. EoD
  390.