NuGet Package An ultra-compact string dictionary

DAWG (Directed Acyclic Word Graph) is a data structure for storing and searching large word lists while keeping your memory footprint small and lookups fast.

DawgSharp is an open-source C# implementation featuring a linear time graph reduction algorithm and out-of-the-box persistence support.

The Dawg class is nearly as fast as a HashSet for lookups and is much, much more memory-efficient (factors of 30x - 40x are not uncommon). In a benchmark application it held two million words while consuming only 2Mbytes of RAM. That's only one byte per word! And it's even less on disk.

The Dawg class can be thought of as a read-only Dictionary: it has a ["string"] indexer and implements IEnumerable>. One other very useful feature of Dawg (not found in Dictionary) is the ability to quickly find all words that start with a particular prefix: dawg.MatchPrefix("star") could possibly yield "star", "starch", "start", "starting", etc.

This package is provided under the terms of the GNU GPL v3.

Source code and documentation are available on GitHub: Commercial licenses are also available at


Version: 1.3.0
Author(s): morpher
Last Update: Saturday, June 23, 2018
.NET Fiddle: Create the first Fiddle
Project Url:
NuGet Url:

Install-Package DawgSharp
dotnet add package DawgSharp
paket add DawgSharp
DawgSharp Download (Unzip the "nupkg" after downloading)

.NETFramework 3.5
  • No dependencies.
.NETFramework 4.0
  • No dependencies.
netstandard1.2 2 packages depend on this package.