Skip to content

Instantly share code, notes, and snippets.

View sanex3339's full-sized avatar
💭
Something happening!

Timofey Kachalov sanex3339

💭
Something happening!
View GitHub Profile
@sanex3339
sanex3339 / jscrush-compress-pseudo.js
Created April 23, 2016 10:42 — forked from nikhilm/jscrush-compress-pseudo.js
JSCrush 'reverse engineering'
segmentLengthBound = ... // B, originally set to s.length/2
counter = {} // o
bestSavings = 0 // M
maxRepetitions = 0 // N
bestSegment = 0 // e
longestSegmentLength = 0 // Z
segmentLength = 0 // t
while (segmentLength <= segmentLengthBound) {
start = 1;