Open
Conversation
Comments added when needed. Removed System.out.print lines to increase efficiency Decreased Big O of encode method and increased functionality of encode Added a timer in ms
tldr unbeatable variable names maintained
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LZW-Compression
From a functionality perspective:
The encode method has been improved from prior versions although it is still not ideal -- before the encode method did not encode the current value and instead
added the dictionary value (256,257 . . . ) sequentially. Now it at least correctly encodes the current value (edge cases have not been tested).
The decode method appears to be functioning correctly.
From a big O perspective:
A for loop has been eliminated in the encdoe method which caused a decrease in run time from 11587 ---> 45 overall.
Some of this decrease can be attributed to eliminating System.out.println methods that were used by the initial coder to test the code
System.out.println have also been removed from the decode method decreasing the runtime from 4298 --> 14 overalll
From a code clarity persepctive: at least 1 method was renamed to more accurately reflect what the method accomplishes.
I tried very hard to maintain Louis and Tyler's stylistic variable names and method names --- comments were used to explain methods that were oddly named
or carried out numerous operations at the same time.