Module dictreader

Module dictreader 

Source
Expand description

Open and read .dict or .dict.dz files.

This module contains traits and structs to work with uncompressed .dict and compressed .dict.dz files. These files contain the actual dictionary content. While these readers return the definitions, they do not do any post-processing. Definitions are normally plain text, but they could be HTML, or anything else, in theory (although plain text is the de facto default).

To understand some of the constants defined in this module or to understand the internals of the DictReaderDz struct, it is advisable to have a brief look at the GZip standard.

Structs§

Chunk 🔒
DictReaderDz
Gzip Dict reader
DictReaderRaw
Raw Dict reader.

Statics§

GZ_COMMENT
Byte mask to query for the existence of a comment in a .dz file.
GZ_FEXTRA
Byte mask to query for existence of FEXTRA field in the flags byte of a .dz file.
GZ_FHCRC
Byte mask to detect that a comment is contained in a .dz file.
GZ_FNAME
Byte mask to query for the existence of a file name in a .dz file.
MAX_BYTES_FOR_BUFFER
Limit size of a word buffer, so that malicious index files cannot request too much memory for a translation.

Traits§

DictReader
A dictionary (content) reader.

Functions§

load_dict
Load a DictReader from file.