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
The current implementation for #55 mostly focuses on finding the delimiter for the packed string that will yield the shortest preprocessed string, changing string quotes inside the code accordingly.
However, the shortest preprocessed string may not yield the shortest packed string.
An alternate route is to refactor all strings within the code so that they all have the same delimiter. When possible, this may incur extra escapes, but will yield one extra token for compression. Among the three quote symbols : ', " and `, :
one will be used for the strings inside the code
one will wrapping the packed string
one can be used as an extra token for compression
This may be worthwhile or not. Depending on the input, there may be leftover tokens (so one extra will bring nothing), or an extra token will achieve another round of compression, worth anything from 1 to many bytes.
As this may not be obvious upon preprocessing, the existing algorithm and the solution described above should be processed as two separate branches (performing packing independently on both, then keeping only the best result) the same way as context hashing.
The text was updated successfully, but these errors were encountered:
Siorki
changed the title
String delimiter : free one token
String delimiter : free one quote to use as token
Dec 28, 2016
The current implementation for #55 mostly focuses on finding the delimiter for the packed string that will yield the shortest preprocessed string, changing string quotes inside the code accordingly.
However, the shortest preprocessed string may not yield the shortest packed string.
An alternate route is to refactor all strings within the code so that they all have the same delimiter. When possible, this may incur extra escapes, but will yield one extra token for compression. Among the three quote symbols :
'
,"
and`
, :This may be worthwhile or not. Depending on the input, there may be leftover tokens (so one extra will bring nothing), or an extra token will achieve another round of compression, worth anything from 1 to many bytes.
As this may not be obvious upon preprocessing, the existing algorithm and the solution described above should be processed as two separate branches (performing packing independently on both, then keeping only the best result) the same way as context hashing.
The text was updated successfully, but these errors were encountered: