[fpc-devel] TBufferedFileStream

José Mejuto joshyfun at gmail.com
Sun Sep 4 13:44:25 CEST 2016


El 04/09/2016 a las 7:15, Michael Van Canneyt escribió:

>> In the other hand a cache system is powerful than a buffered system if
>> you are writing something like a filesystem over a TFileStream where
>> you may need to jump here and there to read data, file allocation
>> tables, attributes, and so on, in this case a cache with multiple
>> pages instead just one improves the result (avoid multiple reads in
>> the same zones).
>
> And why did you not use the bufstream unit of FPC ?
>
> The TBufStream stream implemented there works with any other stream, not
> just files.
>

Hello,

In fact I wrote my code over TStream but in Delphi the class is 
inherited from TFileStream so I take my "TStreamFilter" and adapt it to 
inherit from TFileStream just as Delphi do.

The second powerful reason is that I was not aware about TBufStream :)

TBufStream does support seek ? And SetSize ?

My code like TBufStream inherits from TStream. Which is the advantage of 
inherit from TOwnerStream ?

-- 




More information about the fpc-devel mailing list