https://nikhilism.com/post/2012/demystifying-jscrush
If you go to the live demo, it will do a test to crush/encodeURI and uncrush/decodeURI to the string you pass in and verify that they are the same. Maybe I should write some automated tests.
https://nikhilism.com/post/2012/demystifying-jscrush
If you go to the live demo, it will do a test to crush/encodeURI and uncrush/decodeURI to the string you pass in and verify that they are the same. Maybe I should write some automated tests.
EDIT: On second thought, you'd probably be better off using a completely different compression algorithm that doesn't sacrifice performance for golfability.
I mean it's doing significantly better than LZ. Anyone want to provide simple intuition on these algorithms and where they come from?
It can beat LZ's compression ratio for two reasons:
1. The input consists of only bytes that are valid in an URI, so it doesn't need an additional encoding step.
2. It gets very slow very quickly for larger inputs.