setDictionary(dictionary)
Sets a new dictionary and automatically generates a reverse dictionary for decompression.
Parameters:
dictionary– Object mapping original strings to short keys.
Example:
1compressor.setDictionary({ hello: '$a', world: '$b' });