Documentation
¶
Index ¶
- Constants
- type Dictionary
- type MDictHeader
- type MDictKeyBlockData
- type MDictKeyBlockEntry
- type MDictKeyBlockInfo
- type MDictKeyBlockInfoItem
- type MDictKeyBlockMeta
- type MDictMeta
- type MDictRecordBlockData
- type MDictRecordBlockInfo
- type MDictRecordBlockInfoListItem
- type MDictRecordBlockMeta
- type MDictRecordDataItem
- type Mdict
- func (mdict *Mdict) BuildBKTree() error
- func (mdict *Mdict) Locate(entry *MDictKeyBlockEntry) ([]byte, error)
- func (mdict *Mdict) Lookup(word string) ([]byte, error)
- func (mdict *Mdict) Search(word string) ([]*MDictKeyBlockEntry, error)
- func (mdict *Mdict) SimSearch(word string, tolerance int) ([]*MDictKeyBlockEntry, error)
- type MdictBase
- func (mdict *MdictBase) LocateRecordDefinition(item *MDictKeyBlockEntry) ([]byte, error)
- func (mdict *MdictBase) ReadDictHeader() error
- func (mdict *MdictBase) ReadKeyBlockInfo() error
- func (mdict *MdictBase) ReadKeyBlockMeta() error
- func (mdict *MdictBase) ReadKeyEntries() error
- func (mdict *MdictBase) ReadRecordBlockData() error
- func (mdict *MdictBase) ReadRecordBlockInfo() error
- func (mdict *MdictBase) ReadRecordBlockMeta() error
- type MdictType
Constants ¶
View Source
const ( MdictTypeMdd MdictType = 1 MdictTypeMdx MdictType = 2 EncryptNoEnc = 0 EncryptRecordEnc = 1 EncryptKeyInfoEnc = 2 NumfmtBe8bytesq = 0 NumfmtBe4bytesi = 1 EncodingUtf8 = 0 EncodingUtf16 = 1 EncodingBig5 = 2 ENCODING_GBK = 3 ENCODING_GB2312 = 4 EncodingGb18030 = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
type Dictionary struct { XMLName xml.Name `xml:"Dictionary"` Text string `xml:",chardata"` GeneratedByEngineVersion string `xml:"GeneratedByEngineVersion,attr"` RequiredEngineVersion string `xml:"RequiredEngineVersion,attr"` Encrypted string `xml:"Encrypted,attr"` Encoding string `xml:"Encoding,attr"` Format string `xml:"Format,attr"` Stripkey string `xml:"Stripkey,attr"` CreationDate string `xml:"CreationDate,attr"` Compact string `xml:"Compact,attr"` Compat string `xml:"Compat,attr"` KeyCaseSensitive string `xml:"KeyCaseSensitive,attr"` Description string `xml:"Description,attr"` Title string `xml:"Title,attr"` DataSourceFormat string `xml:"DataSourceFormat,attr"` StyleSheet string `xml:"StyleSheet,attr"` Left2Right string `xml:"Left2Right,attr"` RegisterBy string `xml:"RegisterBy,attr"` }
Dictionary was generated 2023-09-11 11:07:50 by https://xml-to-go.github.io/ in Ukraine.
type MDictHeader ¶
type MDictKeyBlockData ¶
type MDictKeyBlockData struct { KeyEntries []*MDictKeyBlockEntry KeyEntriesSize int64 RecordBlockMetaStartOffset int64 }
type MDictKeyBlockEntry ¶
type MDictKeyBlockInfo ¶
type MDictKeyBlockInfo struct { KeyBlockEntriesStartOffset int64 KeyBlockInfoList []*MDictKeyBlockInfoItem }
type MDictKeyBlockInfoItem ¶
type MDictKeyBlockMeta ¶
type MDictKeyBlockMeta struct { // KeyBlockNum key block number size KeyBlockNum int64 // entriesNums entries number size EntriesNum int64 // key-block information size (decompressed) KeyBlockInfoDecompressSize int64 // key-block information size (compressed) KeyBlockInfoCompressedSize int64 // key-block Data Size (decompressed) KeyBlockDataTotalSize int64 // key-block information start position in the mdx/mdd file KeyBlockInfoStartOffset int64 }
type MDictRecordBlockData ¶
type MDictRecordBlockData struct { RecordItemList []*MDictRecordDataItem RecordBlockStartOffset int64 RecordBlockEndOffset int64 }
type MDictRecordBlockInfo ¶
type MDictRecordBlockInfo struct { RecordInfoList []*MDictRecordBlockInfoListItem RecordBlockInfoStartOffset int64 RecordBlockInfoEndOffset int64 RecordBlockDataStartOffset int64 }
type MDictRecordBlockMeta ¶
type MDictRecordDataItem ¶
type MDictRecordDataItem struct { KeyWord string RecordEntryIndex int64 RecordInfoIndex int64 RecordBlockIndex int64 RecordBlockCompressStart int64 RecordBlockCompressEnd int64 RecordBlockCompressSize int64 RecordBlockDeCompressSize int64 RecordBlockCompressType string RecordBlockEncrypted bool RecordBlockFileRelativeOffset int64 RecordBlockCompressAccumulator int64 RecordBlockDeCompressAccumulator int64 RecordEntryDecompressStart int64 RecordEntryDecompressEnd int64 }
type Mdict ¶
type Mdict struct { *MdictBase // contains filtered or unexported fields }
func (*Mdict) BuildBKTree ¶
type MdictBase ¶
type MdictBase struct { FilePath string FileType MdictType Meta *MDictMeta Header *MDictHeader KeyBlockMeta *MDictKeyBlockMeta KeyBlockInfo *MDictKeyBlockInfo KeyBlockData *MDictKeyBlockData RecordBlockMeta *MDictRecordBlockMeta RecordBlockInfo *MDictRecordBlockInfo RecordBlockData *MDictRecordBlockData }
func (*MdictBase) LocateRecordDefinition ¶
func (mdict *MdictBase) LocateRecordDefinition(item *MDictKeyBlockEntry) ([]byte, error)
func (*MdictBase) ReadDictHeader ¶
ReadDictHeader reads the dictionary header.
func (*MdictBase) ReadKeyBlockInfo ¶
func (*MdictBase) ReadKeyBlockMeta ¶
ReadKeyBlockMeta keyblock header part contains keyblock meta info
func (*MdictBase) ReadKeyEntries ¶
func (*MdictBase) ReadRecordBlockData ¶
func (*MdictBase) ReadRecordBlockInfo ¶
func (*MdictBase) ReadRecordBlockMeta ¶
Click to show internal directories.
Click to hide internal directories.