KingSupernova31 / RulesGuru

The source for rulesguru.net, a resource for Magic judges.
https://rulesguru.net/
8 stars 6 forks source link

Use a proper entropy encoding for searchLink URLs #30

Open KingSupernova31 opened 3 years ago

KingSupernova31 commented 3 years ago

Right now the encoding scheme is quite primitive. It works fine for most searchLinks, only wasting a few bits on things like how "legality" only has 5 possible values but takes up a full 3 bits of space in the encoding. However for more complicated settings such as those that include several card names, the searchLinks get quite long unnecessarily. Using a proper entropy encoding would allow them to be much shorter on average.

The delimiter characters at the beginning and end are also wasting 24 bits of entropy and could probably be removed. Whatever scheme is used for this needs to account for websites that append garbage to their link URLs such as Facebook.

KingSupernova31 commented 1 year ago

Also the "I" delimiter characters in the middle. This is really just an awful encoding scheme. Who designed this.