commit before abandoning my own  lzw & gif encoding. will try and adapt the gifsockets implementation.