tools/smaz: refactor dictionary holder inside the generic package