Dictionaries usually has an index and a data file. I’m writing a dictionary application as a hobby project. I’m confused about how to read the offset file in .NET. The index file is of 4-5 MB size. What is the most efficient way to fetch the offset/length value of a word.
EDIT:
I need to know only how to read offset file if I have a word to search. ie how to search the index file for a word so that I can get the subsequent 8 bytes
4-5 megabytes for the index? That’s nothing. Read the entire thing into a byte array and with it as a MemoryStream or more appropriately, parse the entire contents into appropriate data structures for quick searching (has, b-tree, etc).