(******************************************************************************)
(* *)
(* lh5.pas *)
(* *)
(* this code compress/decompress data using the same algorithm as lharc 2.x *)
(* it is roughly derived from the c source code of ar002 (a c version of a *)
(* subset of lharc, written by haruhiko okomura). *)
(* the algorithm was created by haruhiko okomura and haruyasu yoshizaki. *)
(* *)
(* 6/11/98 modified by gregory l. bullock with the hope of fixing a
problem when compiled for 32-bits.
some variables of type tword are sometimes treated as
array[0..32759]of integer; and other times as
array[0..32759]of word;
insertnode, for example, expects a signed integer since it
includes the expression position^[t]<0.
to account for this, i've defined twobyteint which is a 2-byte
signed integer on either platform.
*)
(* 4/20/98 modified by gregory l. bullock (bullock@tsppd.com) *)
(* - to use tstream (and descendents) instead of files, *)
(* - to reduce the memory requirements in the data segment, *)
(* - to changed the program to a unit. *)
(* the interface consists of the two procedures *)
(* procedure lhacompress(instr, outstr: tstream); *)