home *** CD-ROM | disk | FTP | other *** search
/ TopWare Tools / TOOLS.iso / tools / top1461 / gepackt.exe / LZHUF.DOK < prev    next >
Encoding:
Text File  |  1989-04-06  |  2.2 KB  |  58 lines

  1.  
  2.                                                         April 6, 1989
  3. Note:  This file contains:
  4.  
  5.        LZHUF.C    Source code in 'C'
  6.  
  7.        LZHUF.EXE  Compiled with Microsoft C, Version 5.1.
  8.                   Maximum optimization (-Ox) used.
  9.  
  10.  
  11.  
  12. %: 213115 S10/ 16-32 Bit
  13.     06-Apr-89  06:42:57
  14. Sb: %213112-LZHUF source code
  15. Fm: Dennis Vallianos 70406,1163
  16. To: Sysop Irv Hoff 76701,117
  17.  
  18. I spent a little time with the LZHUF.C source code today and can report
  19. the following:
  20.  
  21. It compiles without change using Turbo C (1.0) or Microsoft C (5.1).
  22. The code is close to ANSI, so should compile ok with any C compiler
  23. that adheres to the standard.
  24.  
  25. The compressed files produced appear to be exactly the same as those
  26. produced by LHARC, based on some very limited visual observation.
  27. LHARC adds a longer header before the compressed code in order to
  28. accommodate multiple files in an LZH file, so that has to be discarded
  29. before comparing the actual files.  The header produced by LZHUF is 4
  30. bytes, while on LHARC it is variable, from about 22-30 bytes.  The rest
  31. of the program appear identical from my preliminary observations.
  32.  
  33. The use of assembly language optimization in LHARC is obvious from the
  34. results I got from both programs.  The LZHUF source code compiles to a
  35. 30k LZHUF.EXE file while LHARC.EXE is under 20k (which includes a full
  36. screent of options, etc.)  Compress and decompress times for the SALT.DOC
  37. file from Telix 3.11:
  38.  
  39.  
  40.       SALT.DOC   186,437
  41.  
  42.       ARC601      84.962    14.50 to make     8.81 to extract
  43.       PKZIP 092   65,559    18.89 to make     4.31 to extract
  44.  
  45.       LHARC       59,425    37.32 to make    10.65 to extract
  46.       LZHUF       59,384   135.34 to make    23.23 to extract
  47.  
  48.  
  49. So it appears Yoshi has achieved a significant reduction in LHARC.EXE
  50. executable size (even with the additional options such as making a self-
  51. extracting file, multiple file handling, etc.) as well as running
  52. about 3-1/2 times faster to generate the file and twice as fast to
  53. extract/uncompress the file.
  54.  
  55. Yoshi's additional work to speed up LZHUF is pretty impressive, but this
  56. LZHUF.C program allows anybody interested in compression to start at the
  57. same place he did.
  58.