-
Notifications
You must be signed in to change notification settings - Fork 14
Pattern view
This tool is integrated in RegPack GUI when run in a browser. It highlights the patterns found by the crusher to give a visual feedback to the user.
The viewer was inspired by Keith Clark's original work.
The rendering is done in the "Preprocessed" window as the compression is performed on the preprocessor's output.

Individual patterns are surrounded with a colored background.
In the example below, the patterns are for( , t= , 512 , x= , =0; , 256 and +=.

Long patterns may contain shorter subpatterns. In this case the deeper levels of compression are shown in a darker tone of color. In this example, t=Math.max(0,Math.min(1, is a pattern, and so are Math. and 0,. The latter two end up being compressed twice.

The tool is implemented in the class PatternViewer. It creates its display from the output of the crusher :
- the unpacked (but preprocessed) code
- the dictionary built by the crusher