forgot to save after deleting write_pgm() ...
new (less code) code_ok() function
renamed decode to decode_huff
removed SEARCH_D8 state