Open kamil-kielczewski opened 4 years ago
I use this tool to analyse.
After some test I see that base8 jsf is about 15-20% smaller than base4. So it is worth to use this Idea - at lest at some point in case when base8 decoder will be bigger than base4 we can switch that decoders at some point - when source code is so big that we have profit of using base8. (in case when base4 will be bigger than base8 decoder - we can drop base4 at all)
Research on base8 decoder will be done here
06.09.2020 - research done. Tool in above link have beta wersion of compiler which include dynamic deconverter based on textStatistics. Tool is written in that way that makes requirements of task #3
Instead of #4 approach we can try to use following modification - we assume that each character have 4-digit representation (we use padding 0 - details here)
So we can change this
'\141\154\145\162\164\50\61\51'
to this'\141\154\145\162\164\050\061\051'
-and now we don't need backslashes at all (in base8 code represenation now we use 8 digit - not 9 like before)We need to perform similar investigation like for #4.
Bootstrap: we can use above approach using current small-jsfuck algorithm but whitch
toString(8)
andparseInt(x,8