program DicTest; USES xCrt, LZTests, LZTypes, LZBase, LZDic; const bs:set of Byte=[]; cInitialBuf='abcdabce abcd abceabcabcabcd abcaabcdabce abceca '; cBuf:string[Length(cInitialBuf)]=cInitialBuf; procedure WriteCode(const Codes:tLZCodesArray; n:tCodesIndex); var i:tCodesIndex; c:tIndex; begin i:=0; while iHigh(tCodesIndex) then begin write('!',n); RunError(201); end; WriteCode(Codes,n); end; { for i:=Low(i) to 65000 do begin n:=Dic.ByteToCodes(random(255),Codes); if n>High(tCodesIndex) then begin write('!',n); RunError(201); end; WriteCode(Codes,n); end;} writeln; writeln; writeln('Initial Size:',Dic.InitialSizeInBytes); writeln('Compressed Size:',Dic.CompressedSizeInBytes); writeln('Free:',Dic.FreeSizeInNodes); writeln('CurrentMaxFragmentSize:',Dic.CurrentDictionaryMaxFragmentSize); writeln; Dic.WriteFragments(WorkBuffer,SizeOf(WorkBuffer)); Dic.SeqCheck; Dic.Done; writeln('Program TestLZDictionary end.'); end.