Total RP 3: Extended

Total RP 3: Extended

903k Downloads

Compress export strings and encode to base64

Ellypse opened this issue ยท 2 comments

commented

To make export string lighter and safer, we should compress them (using LibDeflate) and encode the string in base64 (to avoid characters that could potentially be modified by text editors).

Flow when creating an export string:

  • Serialize the table into a string (use AceSerializer)
  • Compress the string using LibDeflate
  • Encode the string into base64

Flow when importing a string:

  • Try to decode the base64 string, if fail go to last step
  • Decompress using LibDeflate
  • Deserialize the string using AceSerializer to get the creation table
commented

Note: Unlike discussed on Discord, we probably don't need/cannot use a prefix like ! to denote between old and new algorithm because of the base64 encoding (which was not used previously). We will have to fall back to trying to decode base64 and catching when we fail.

commented

For the base64 encoding, I think we should use alphanumerics characters and +=. This is the encoding used by ElvUI. WeakAuras uses () but I feel like += are safer candidates to not be formatted by text editors.