Recommendations
The following ideas can be used to improve future CTW implementations:
- In this implementation each tree node requires 8 bytes of memory. This could be reduced to 6 bytes as follows: in leafs β is always 1 so it can be eliminated, while in internal nodes the pointer to the filebuffer (to find the entire context that is needed for unique path pruning) is not needed. These fields could be stored in the same position in the tree record.
- When encoding small files, the allocated tree array is usually much larger than required, so it remains very sparse during encoding or decoding. This means only part of the memory was actually needed. The problem is that the number of required tree nodes is only known after the encoding process. It would be an improvement if the number of required nodes could be forecasted before the encoding process starts, so the size of the tree array can be adapted to this forecasted number of required nodes. However, it is not sure if a good estimation of the required number of nodes is possible.
- To make the program more useable, the possibility to store more files in one CTW-archive file could be added.