[fpc-pascal] How create a full text search with TChmWriter?

Andrew Haines AndrewD207 at aol.com
Wed Feb 22 18:06:08 CET 2012


On 02/21/12 10:08, Mattias Gaertner wrote:
> 
> Andrew Haines <andrewd207 at aol.com> hat am 21. Februar 2012 um 15:24
> geschrieben:

> 
>> I guess then you are using AddStreamToArchive.
> 
>  
> 
> No. I set 
> 
>     Writer.OnGetFileData :=@OnWriterGetFileData;
> And in OnWriterGetFileData I write the html into the stream.
> 


Ok I found a bug here which may affect you or not.

in OnWriterGetFileData make sure you set Stream.Size = 0 before you
write your file to it. It will keep the size of the biggest stream you
have given it to compress otherwise.

Alternatively you could free the stream and then just assign your opened
stream to to the variable.

I really noticed it when it compressed the table of contents of the lcl
(it's > 1mb) and suddenly all the files started taking forever to
compress. This doesn't effect fpdoc since it uses AddStreamToArchive.

Regards,

Andrew



More information about the fpc-pascal mailing list