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 🔒
- Dict
Reader Dz - Gzip Dict reader
- Dict
Reader Raw - Raw Dict reader.
Statics§
- GZ_
COMMENT - Byte mask to query for the existence of a comment in a
.dzfile. - GZ_
FEXTRA - Byte mask to query for existence of FEXTRA field in the flags byte of a
.dzfile. - GZ_
FHCRC - Byte mask to detect that a comment is contained in a
.dzfile. - GZ_
FNAME - Byte mask to query for the existence of a file name in a
.dzfile. - MAX_
BYTES_ FOR_ BUFFER - Limit size of a word buffer, so that malicious index files cannot request too much memory for a translation.
Traits§
- Dict
Reader - A dictionary (content) reader.
Functions§
- load_
dict - Load a
DictReaderfrom file.