mirror of https://github.com/gorhill/uBlock.git
fa83744b58
The purpose of using a custom base128 encoder is to convert array buffers into strings, to allow a direct string-to-array buffer conversion at load time: string => array buffer Whereas a JSON array would require an extra step: JSON array as string => JS array => array buffer Turns out that the current use of a custom base128 encoding results in a significantly larger selfie storage usage when converting array buffers into strings. Speculation: possibly the browser convert the strings to save into JSON strings internally. Since the custom base128 encoder is likely to cause the resulting string to contain a lot of unprintable ASCII characters, these will need to be escaped when converted to JSON -- escaped characters occupy more space than non-escaped ones. Using a sequence of base 64 numbers means only printable will be present in the output string, hence no escaping necessary. I have observed significant reduction in storage usage for selfie purpose. |
||
---|---|---|
.. | ||
_locales | ||
css | ||
img | ||
js | ||
lib | ||
web_accessible_resources | ||
1p-filters.html | ||
3p-filters.html | ||
about.html | ||
advanced-settings.html | ||
asset-viewer.html | ||
background.html | ||
cloud-ui.html | ||
dashboard.html | ||
document-blocked.html | ||
dyna-rules.html | ||
epicker.html | ||
logger-ui.html | ||
popup.html | ||
settings.html | ||
shortcuts.html | ||
whitelist.html |