Initial checkin of LZW encoding

Untested. Mostly copied from unversioned tests, but suspect there may be
problems with edge cases like ending on the 255th or 0th byte, or early
clearing.