DictImport.saveIdx Method
Creates an index file from the index created anIndex
[Visual Basic]
Private Shared Sub saveIdx( _
ByVal
anIndex As
Hashtable, _
ByVal
aDictFileName As
String, _
ByVal
anIdxFileName As
String, _
ByVal
aProgressHandler As
IProgress, _
ByVal
aType As
DictType _
)
Parameters
-
anIndex
- The index. The keys are index keywords as strings, eg. English keywords in the English-German dictionary. The values are ArrayLists of DictEntryRef objects with the references to the keyword descriptions in the dictionary file aDictFileName.
-
aDictFileName
- The name or path to the dict.cc dictionary file.
-
anIdxFileName
- Name or path to the index file to create.
-
aProgressHandler
- Handler for showing progress of the storing operation.
-
aType
- The dictionary type, eg. dict.cc, UDDL
Remarks
The index file created is a binary file (System.IO.BinaryWriter) having the following format:
- The dictionary type, DictType catsed to Int32.
- Number of index keywords n_keywords, Int32.
- Length of the name of the dict.cc dictionary file in bytes, Int32.
- Name of the dict.cc dictionary file, bytes in encoding for the particular dictionary type.
- n_keywords entries having the following format:
- Length of the index keyword in bytes, Int32
- The index keyword, bytes in encoding for the dictionary type
- Starting index of the first DictEntryRef for the keyword, Int32
- Number of DictEntryRef entries for the keyword, Int16
- The biggest part on the end of the index file are DictEntryRef entries each consisting of:
- Begin position of the keyword description in the dict.cc dictionary file, Int32.
- Number of bytes for the keyword description in the dict.cc dictionary file, Int16.
The number and sequence of the DictEntryRef entries in the file according to the data for the index keyword, ie. first come entries for the keyword1, then for keyword2 etc.
See Also
DictImport Class | dict Namespace | DictIndex