A
TraleSLDFSPacker
can be used to reduce memory usage when
storing many strings with many shared substrings. This is achieved by
breaking strings down into smaller units and storing the full strings as
objects that recursively share substructures (a packed forest). The heuristic
used for splitting strings up is geared towards strings where frequently
occuring substrings start with
"("
and end with
")"
.
Note that strings stored using a bracket packer will not be garbage-collected
until the bracket packer itself is.