How to apply custom decompression to .z file

QuestionsHow to apply custom decompression to .z file
sethbeckerman5 Staff asked 4 years ago

I have written a LZW decoder algorithm in Go for a programming task required as part of a job application. A LZW code is a sequence of integers which can be decoded as a string. I have basically written a function that looks like this:

They have provided me with a file which is encoded using LZW encoding so I can test my algorithm on it (it decodes to human readable text).
However, I don't know how to "load" that file into an integer slice that I can run through my function. Any help would be greatly appreciated.


View on Stack Overflow