tools/smaz: actually implement dictionary optimization