You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, there is only 1 triplet has batch atob() definition: "mCh" == atob("bUNo"). But there are more triplets which batch atob() definition are practical:
"#!/" (common in URL hashbang grammar) currently costs 1989 chars, while atob("IyEv") only costs 1942 chars;
"{b:" (sometimes can be seen in object definitions) currently costs 1121 chars, while atob("e2I6") only costs 961 chars;
"www" (well-known part of domain name) currently costs 990 chars, while atob("d3d3") only costs 900 chars.
But batch atob() can go further since string segment made up by triplets mentioned before can be created by only one atob(), which is shorter by three-by-three conversion. additionally, some triplets are impractical with atob() as triplet, but their corresponding base64 string have code shorter than original triplet, hence can be combined into single atob() with suitable context. For example, "://" (common in URL header) currently costs 1311 chars, which base64 string "Oi8v" only costs 723 chars, but atob("Oi8v") costs 1544 chars.
Such usage of batch atob() conversion would be challenging since you need an algorithm to clip out most suitable segment form original string for batch atob() conversion.
The text was updated successfully, but these errors were encountered:
"mCh" is useful to optimize "fromCharCode" which is found in many definitions. Providing definitions for every sequence of characters that could be possibly optimized with atob is not an option. I started working on a generic algorithm to optimize arbitrary sequences using different native functions, but in order to implement this feature, many parts of JScrewIt need to be rewritten, so I am thinking to do this in a next major version, without support for certain old engines.
Currently, there is only 1 triplet has batch
atob()
definition:"mCh" == atob("bUNo")
. But there are more triplets which batchatob()
definition are practical:"#!/" (common in URL hashbang grammar) currently costs 1989 chars, while
atob("IyEv")
only costs 1942 chars;"{b:" (sometimes can be seen in object definitions) currently costs 1121 chars, while
atob("e2I6")
only costs 961 chars;"www" (well-known part of domain name) currently costs 990 chars, while
atob("d3d3")
only costs 900 chars.But batch
atob()
can go further since string segment made up by triplets mentioned before can be created by only oneatob()
, which is shorter by three-by-three conversion. additionally, some triplets are impractical withatob()
as triplet, but their corresponding base64 string have code shorter than original triplet, hence can be combined into singleatob()
with suitable context. For example, "://" (common in URL header) currently costs 1311 chars, which base64 string "Oi8v" only costs 723 chars, butatob("Oi8v")
costs 1544 chars.Such usage of batch
atob()
conversion would be challenging since you need an algorithm to clip out most suitable segment form original string for batchatob()
conversion.The text was updated successfully, but these errors were encountered: