Documentation ¶
Index ¶
- Constants
- func BuildRangeTree(list []*MdictRecordBlockInfoListItem, root *RecordBlockRangeTreeNode)
- type Dictionary
- type MDictKeywordEntry
- type MDictKeywordIndex
- type MDictKeywordIndexRecordBlock
- type Mdict
- func (mdict *Mdict) BuildIndex() error
- func (mdict *Mdict) CreationDate() string
- func (mdict *Mdict) Description() string
- func (mdict *Mdict) Digest() string
- func (mdict *Mdict) GeneratedByEngineVersion() string
- func (mdict *Mdict) GetKeyWordEntries() ([]*MDictKeywordEntry, error)
- func (mdict *Mdict) GetKeyWordEntriesSize() int64
- func (mdict *Mdict) IsMDD() bool
- func (mdict *Mdict) IsRecordEncrypted() bool
- func (mdict *Mdict) IsUTF16() bool
- func (mdict *Mdict) KeywordEntryToIndex(item *MDictKeywordEntry) (*MDictKeywordIndex, error)
- func (mdict *Mdict) LocateByKeywordEntry(entry *MDictKeywordEntry) ([]byte, error)
- func (mdict *Mdict) LocateByKeywordIndex(index *MDictKeywordIndex) ([]byte, error)
- func (mdict *Mdict) Lookup(word string) ([]byte, error)
- func (mdict *Mdict) Name() string
- func (mdict *Mdict) Title() string
- func (mdict *Mdict) Version() string
- type MdictAccessor
- type MdictBase
- type MdictRecordBlockInfoListItem
- type MdictType
- type RecordBlockRangeTreeNode
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 ¶
func BuildRangeTree ¶
func BuildRangeTree(list []*MdictRecordBlockInfoListItem, root *RecordBlockRangeTreeNode)
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:"IsUTF16,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 MDictKeywordEntry ¶
type MDictKeywordIndex ¶
type MDictKeywordIndex struct { //encoding int //encryptType int KeywordEntry MDictKeywordEntry RecordBlock MDictKeywordIndexRecordBlock }
type Mdict ¶
type Mdict struct { *MdictBase // contains filtered or unexported fields }
func (*Mdict) CreationDate ¶
func (*Mdict) Description ¶
func (*Mdict) GeneratedByEngineVersion ¶
func (*Mdict) GetKeyWordEntries ¶
func (mdict *Mdict) GetKeyWordEntries() ([]*MDictKeywordEntry, error)
func (*Mdict) GetKeyWordEntriesSize ¶
func (*Mdict) IsRecordEncrypted ¶
func (*Mdict) KeywordEntryToIndex ¶
func (mdict *Mdict) KeywordEntryToIndex(item *MDictKeywordEntry) (*MDictKeywordIndex, error)
func (*Mdict) LocateByKeywordEntry ¶
func (mdict *Mdict) LocateByKeywordEntry(entry *MDictKeywordEntry) ([]byte, error)
func (*Mdict) LocateByKeywordIndex ¶
func (mdict *Mdict) LocateByKeywordIndex(index *MDictKeywordIndex) ([]byte, error)
type MdictAccessor ¶
type MdictAccessor struct { Filepath string `json:"filepath"` IsRecordEncrypted bool `json:"is_record_encrypted"` IsMDD bool `json:"is_mdd"` IsUTF16 bool `json:"is_utf_16"` }
func NewAccessor ¶
func NewAccessor(mdict *Mdict) *MdictAccessor
func NewAccessorFromJson ¶
func NewAccessorFromJson(data []byte) (*MdictAccessor, error)
func (*MdictAccessor) RetrieveDefByIndex ¶
func (mdi *MdictAccessor) RetrieveDefByIndex(index *MDictKeywordIndex) ([]byte, error)
func (*MdictAccessor) Serialize ¶
func (mdi *MdictAccessor) Serialize() ([]byte, error)
type MdictRecordBlockInfoListItem ¶
type MdictRecordBlockInfoListItem struct {
// contains filtered or unexported fields
}
func QueryRangeData ¶
func QueryRangeData(root *RecordBlockRangeTreeNode, queryRange int64) *MdictRecordBlockInfoListItem
type RecordBlockRangeTreeNode ¶
type RecordBlockRangeTreeNode struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.