View Single Post
11-10-12, 05:32 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Also, keep in mind that Blizzard's addon policy prohibits any kind of code obfuscation. Addons like Carbonite get special exceptions in writing from Blizzard, but generally, you should not be using obfuscating techniques like string compression unless you actually need to. For example, you would want to compress long strings for sending them over the addon comm channel. However, it is unnecessary to compress anything in your addon's saved variables. The disk space savings will be insignifcant at best, and any fractions of picoseconds you shave off the file read time will overshadowed by the additional time it takes to decompress the data.

For your specific example, a better solution would be to store the item's locale-independent ID. The ID for the Sharptalon's Claw item is 16305. It's shorter, and will work for everyone no matter what language they are playing in. Then, wherever you currentply parse the name out of item links to check against your data, parse out the ID instead.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote