Basically we need a function that with the below parameters:
procedure ZlibCompressStreamEx(InStream, OutStream: TStream;
NumLevel: Integer; StreamType : TZStreamType; offset : integer; length : integer)
which will start compressing from offset for length bytes. This function will be an addition to ICS Zlibhigh unit from www.overbyte.be. There is already code for starting from offset but until the end of the stream.
YOU CAN TRUST ME THAT THIS FUNCTION SHOULD NOT BE MUCH DIFFICULT FOR A DELPHI CODER AT ALL. ALL I NEED IS TO BE ABLE TO LIMIT THE LENGTH IF INPUT STREAM WITH LENGTH WHICH IS JUST BEING COMPRESSED UNTIL THE END OF THE STREAM!