On Tuesday 17 June 2003 12:43 am, Shachar Shemesh wrote:
Gregory M. Turner wrote:
But encoding is inherently harder to implement than decoding (there's a lot more "to do", and usually no single right answer, so you never know when you're done).
Ah?
Every book, software and piece of common knowledge tells me that decoding is WAY more difficult. "Be restrictive in what you produce, and permissive in what you accept" means that, when decoding, you need to accept broken encodings too, as well as encodings that took a different path than the one you would take (different algorithm, different paramters, optional parameters, etc). When encoding, you need to select a single path and go that way.
Hmm, that's a good point, I never thought of it that way. I guess I was thinking in terms of computational complexity, but from a difficulty-of-implementation perspective (which is what I was intending to address), I think you are right, I have it backwards above. In this particular case, however, the fact that the decompression code was gifted to us probably nevertheless reverses the relative labor requirements we would expect based on that principle.