ScrabbleBuilder class

Compress Scrabble word file into a compressed readable string.

The steps in the compression are as follows:

  1. Prefix encoding The current word is compared with the previous word The word is encoded as the length of the common prefix followed by the suffix For example: use, used, useful, usefully are encoded as 0use, 3d, 3ful, 6ly
  2. Plural optimization Words that are the previous word with suffix 's' are represented by a special flag character
  3. Dictionary encoding - optional, minimal effect Every word (with its prefix length) is added to a dictionary with the count of occurrences The dictionary is sorted by occurrence count, and the most valuable are used in a lookup array
  4. GZIP and Base64 of compressed buffer

Constructors

ScrabbleBuilder()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

compressScrabble(String dictionary, {bool statistics = false, bool verbose = false, bool useLookup = false, int quickSize = -1}) String?
Compress dictionary file into a string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited