Hello,

 

In current master code base 5 different arrays are used for compression as described below,

·         Two dimensional array is used to store terminating code words for 1’s length code and 0’s length code.

·         Two dimensional array is used to keep size of each codeword

·         Two dimensional array is used to store make up code words

·         Two dimensional array is used to keep size of each codeword of makeup code words

·          one array for each code word  to return corresponding value for makeup code words

 

We are proposing following modification for above,

·         Array of strings shall be used for  1’s run length code word

·         Array of strings shall be used for 0’s run length code word

 

These two arrays will have code words of both terminating codes and make up codes together.

 

In this approach two trees (i.e ones list and zero list) shall be introduced and entire code word traversing shall be done in respective tree in single traversal.

With this approach we can avoid multiple array usage.

 

The above changes will be sent in my next patch

 

Regards,

Sangamesh