c31293%tansei.cc.u-tokyo.ac.jp@RELAY.CS.NET (Kenji Rikitake) (04/06/89)
Checksum: 4042323451 (Verify with "brik -cv") Posting-number: Volume 02, Issue 042 Originally-from: Haruhiko Okumura, Haruyasu Yoshizaki, & Kenji Rikitake Submitted-by: Kenji Rikitake <c31293%tansei.cc.u-tokyo.ac.jp@RELAY.CS.NET> Archive-name: lharc/lzhsrc10.uue [ US users should note that the cost of international email is usually borne by the non-US recipient or sender. -- R.D. ] Following is a source code of single-file compression/uncompresssion program. It has the same compression algorithm with LHarc. I have got a permission to post this to the USENET community from Haruyasu Yoshizaki. -- Kenji [ From the source: * 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 The source is fairly generic but has a few ANSI-specific features such as memmove() and function prototypes. It compiles with Turbo C 1.0. The resulting program is quite fast, considering it is written purely in C. It seems to compress exactly as well as lharc itself. I did not try to compile it on any other system. This would have been the perfect text posting except that there are some control characters in the source, so I archived it. Checksums obtained with the 4.3BSD "sum" or System V "sum -r" command. checksum size (bytes) file (between BEGIN--cut and END--cut lines) 31099 9715 lzhsrc10.uue checksum size (bytes) file 32520 7028 lzhsrc10.arc -- R.D. ] lharc part01/01 BEGIN--cut here--cut here begin 644 lzhsrc10.arc M&@A,6DA51BY#`"4E)24E!1H``($2FK545B8Y```,+U0T4`!"!0@F6I!4,>)B M"(@B;LZP23,'#0@[9>3,2?/@8+F`,+`A"2)@Y9<B`Z`A"21@X8=R407DQ MXT:6,G*T</+$2HL8.7#@&&D0X90I(,:\(9,2A)@\()"$D5,'39HU;T`\65*E M214I08B""$+F)9TT&*/6,6.F34P00Y:FB9AT:=.G4:?6R7.R#H@L3Z8@2:(E MR)(D8HN024.G:4R5=.3$G,,F3&/(62%*I&@1[Y(R;M2D`2$ER6$JAHL0?3%P MX(BY8]C480J"QQPZB]^X0./#-6S9M&WCGBAF=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