Re: Decoding strategy




Kevin Spencer napisal(a):
I would use a FileStream instance to read the file. The FileStream class
supports random access to files, allowing you to jump around in the file.
You can read as little or as much as you want into memory when you need to.


Hello Kevin
Thanks for reply.
I didn't test performance with FileStream, but maybe you can confirm -
Does File Stream caches contents of file in memory? I think there is
slight speedup when using memory mapping in that I do not have to hit
the disk all the time. In my solution I simply open mapping over whole
file and create views as needed. Anyway, let's say that I did it using
FileStream, I can read some bytes from it, but I still face the same
problem - how to interpret first bytes I have read, whether they are
beginning of character, or maybe end of "previous" character?

.



Relevant Pages

  • Re: Decoding strategy
    ... Does File Stream caches contents of file in memory? ... FileStream does buffer, which is in a sense a kind of caching. ... beginning of character, or maybe end of "previous" character? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Decoding strategy
    ... Does File Stream caches contents of file in memory? ... FileStream does buffer, which is in a sense a kind of caching. ... beginning of character, or maybe end of "previous" character? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Decoding strategy
    ... explicit access of "memory buffer". ... know :-)) to contiguous memory I save one copy operation each time I ... I assumed that memory mapping would be the best way ... I build for myself character index, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Decoding strategy
    ... the FileStream is the .Net equivalent of a FILE pointer. ... Does File Stream caches contents of file in memory? ... slight speedup when using memory mapping in that I do not have to hit ... beginning of character, or maybe end of "previous" character? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: both specifying now, Khalid and Hamza pined the recent tents in search of current notion
    ... equally squeeze Hakeem and Annie's protestant draper. ... rain insights. ... Gawd, I'll project the character. ... it will apparently guide the memory. ...
    (sci.crypt)