lz77-kit icon indicating copy to clipboard operation
lz77-kit copied to clipboard

Settings parameter is not documented

Open igorko opened this issue 4 years ago • 1 comments

You can define some input parameters for algorithm (at least for javascript implementation https://github.com/olle/lz77-kit/blob/master/src/main/js/lz77.js#L37) but they are not documented

  1. referenceIntBase
  2. minStringLength
  3. defaultWindowLength

How changing this will influence the workflow.

  1. As I see referenceIntBase. which is 96, defines the last used character above 'space' (with code 32), so last character will be 127. which is ASCII 'DEL'. Is it ok to change value from 96 to 95 to allow only printable characters in encoded string? Can it have any side effects? Also javascript implementation produces UTF-16 characters(with String.fromCharCode), but while you are using this 96 value, you are in ASCII range. Can it be set to larger value to produce real UTF-16 string? Any use of it?
  2. How changing minStringLength will change algo behaviour?
  3. As I understand it can be changed but may be too large. How changing it will change algo behaviour?

igorko avatar May 13 '20 14:05 igorko

Hi @igorko - thank you for adding the issue to the project. It clearly describes some important and interesting properties to learn and understand about the LZ77 algorithm.

I'll see if I get some time to extend the source code. In the mean time, I suggest that you look at the reference information.

https://en.wikipedia.org/wiki/LZ77_and_LZ78

Perhaps even diving deeper and reading the paper from 1977.

Usually this project and repository is a source of information for CS students. So I think it is only fair to leave this issue open for you or someone else out there to extend the project, helping out their peers, and adding to the documentation in this project.

olle avatar May 13 '20 15:05 olle