v7.0.0
No changes in public API; a lot of internals changed though, for faster encoding & decoding and reduced memory usage.
Improvements
Reduced length of the encoded trie by 21% for HTML (from 15,242 words (uint16) to 12075), by:
- Adding a semicolon flag on value nodes, which means semicolons don't have to be encoded anymore.
- Compacting dict keys: two keys are now stored in each word, instead of one
- Compacting runs of 3 or more characters: successive characters are now also stored as two characters per word
Also reduces the size of the encoded table by 32% (after the previous change) by encoding it as base64.
Encodes the encode trie as a string, with a simple parser turning it into the previous structure on load. This leads to a 44% decrease in file size (from 24,034 to 13,392 bytes).
Uses bitmaps to replace regex when looking for ASCII code points that should be replaced with entities. Leads to a ~1.6x speed up for encodeHTML.
Miscellaneous
- Fix broken repository URL in package.json by @ExplodingCabbage in https://github.com/fb55/entities/pull/1919pull/1931
- Use Biome by @fb55 in #1953
New Contributors
- @ExplodingCabbage made their first contribution in #1919
Full Changelog: v6.0.1...v7.0.0