(* procedure lhaexpand(instr, outstr: tstream); *)
(* these procedures do not change the current position of either *)
(* tstream before performing their function. thus, lhacompress *)
(* starts compressing at instr's current position and continues to *)
(* the end of instr, placing the compressed output in outstr *)
(* starting at outstr's current position. if you need the entirety *)
(* of instr compressed or uncompressed, you'll need to set *)
(* instr.position := 0 before calling one of these procedures. *)
(* *)
(* see the test program at the end of this unit for an example of *)
(* how to use these procedures. *)
(* *)
(* changing this to a unit required the (internal) addition of *)
(* procedure freememory; *)
(* procedure initmemory; *)
(* to ensure that memory gets initialized properly between calls *)
(* to the unit's interface procedures. *)
(******************************************************************************)
unit lh5unit;
{turn off range checking - mandatory ! and stack checking (to speed up things)}
{$b-,r-,s-}
{$define percolate}
(*
note :
lharc uses a "percolating" update of its lempel-ziv structures.
if you use the percolating method, the compressor will run slightly faster,
using a little more memory, and will be slightly less efficient than the
standard method.
you can choose either method, and note that the decompressor is not
affected by this choice and is able to decompress data created by each one
of the compressors.
*)
interface
uses