Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crusher phase - list patterns that are "almost" gains #48

Closed
Siorki opened this issue Feb 24, 2016 · 2 comments
Closed

Crusher phase - list patterns that are "almost" gains #48

Siorki opened this issue Feb 24, 2016 · 2 comments
Assignees
Milestone

Comments

@Siorki
Copy link
Owner

Siorki commented Feb 24, 2016

A specialization of #8.
The crusher could report patterns that were not added to the dictionary because the gain was zero or negative, but that could topple on the positive side with one more character or occurrence. The end of the info panel (after the allocated tokens) would be the right place for this.

This is interesting when attempting to refactor one's code to benefit from the entropy packing. Current example features 3 occurrences of 64 which is not enough to warrant a gain. Adding a 4th instance (or replacing another numerical value with 64) would bring the gain to 1 byte.

@Siorki Siorki added this to the 5.0 milestone Feb 24, 2016
@Siorki Siorki self-assigned this Feb 24, 2016
@xem
Copy link

xem commented Feb 25, 2016

Good idea! It's true, sometimes we don't know what we could change slightly to make a difference once packed

Siorki added a commit that referenced this issue Apr 29, 2016
Show in info panel patterns that need only one extra occurrence to
register a gain
@Siorki
Copy link
Owner Author

Siorki commented Nov 23, 2016

Following implementation of #47, the crusher records pattern strings that were left uncompressed after the token space was used up.

Those patterns are now shown in the info panel. When this happens, compression can be improved by freeing an extra token (and thus #8 could check on least used characters and suggest to avoid them).

Closing the issue as we now have listed :

  • patterns that would compress if an extra token were available
  • patterns that would bring a gain if there was an extra occurrence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants