codi.link
codi.link copied to clipboard
refactor(Root): Compress url before encoding to base64 to make it shorter
Moved out of main url logic, now url gets compressed and encoded to b64 to save up space
Before refactor Length is 24104
After refactor Length is 8607
ISSUES CLOSED: #7
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/midudev-pro/codi-link/AF7BEtNLR73HzGQcyPh1JaY8PoBm
✅ Preview: https://codi-link-git-fork-quevedoib-refactor-compress-url-midudev-pro.vercel.app
Nice job. Please, check the related issue to close. I think is #8 ;)
@javigaralva Thanks! I'm not sure if this PR closes #8 since midudev specified to avoid b64 encoding in that issue and with this approach we save a lot of space but we still encode in b64.
I've just tested and with compression + encoded uri component we save like 40 characters in a link with this content Link Since optimization is not that huge @midudev do you prefer encodedUriComponent or b64?
@QuevedoIB could you please fix the conflict! Sorry for the trouble!
@QuevedoIB could you please fix the conflict! Sorry for the trouble!
Done! 🥇