4 ms·
Given that sample (see blog comments), it is a little trickier than a simple substitution. Edit: I stand corrected on the original statement about lengths - wa
by mrduncan 16y ago
Given that sample (see blog comments), it is a little trickier than a simple substitution.
Edit: I stand corrected on the original statement about lengths - wasn't paying attention and was performing integer division.
- olalonde 16y agoAre you sure it's exactly 8? I get ~8.9 times its own length. var fox = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"; var decodedfox = atob("SDdRJFYxMSUmPT5WKD85Kzk+Mi8kK0QmJDY2VkMuRTROJT0hLk03KTFGRjUuSiAyPyhRUjNaOlJFTTYqSUNKUFRVMFZLR009IDpKLDY1IU5JKTZFMywnICY8VUROUC8hISBBIzMiLCNBJy1JPyI/T1Y/R1AiLTQ0WT0pPFMjLidLV00ySDpNNTAwJkZJRyNNMVVPSVkuLC9GIyYyLDFNSjZDNi0oIy5QOyE3OiFLIzUiKldDM01UQylTS0hVLSc3OFFDJyRQITRRWE85OlgtVzM7MjZGKElWK0dHT0FDPSgnTFUhUjtXSDZKQ1cjUjYyPFU7OVZPLEYvPkg1TERXIzEpQTpLMFRQJT9SMjNBWE40N1UhLCEjWSogRz1DMCM3WClAOkNKUD5QPykmMCtAIUNHIzdXLCk9JCVYJ0tGVFgxSSxGKyErJSVHTlJVVUQxOUJZLDklKD4yLChIMCc1I0Q3SUYhMTc9OicyKERSNFNOTiIpRz06USdENUVVRCE="); console.log(decodedfox.length/fox.length);
- narkee 16y ago26/3 is ~8.67, I wonder if that is relevant.
- user24 16y ago> encodes to exactly 8 times it's own length really? I have strlen(decoded-text) at 383 chars, and qbf as 43 chars, giving the encoded as 8.906976744186 times the size of the original...
- Dobbs 16y agoYou did the same thing I did which is to forget to force floating point division.