
Since we already have a little hierarchy based on the codec's purpose: Codec.Image (e.g. Codec.Image.Jpeg) Codec.Video (e.g. Codec.Video.Mpeg2) then how about adding Codec.Text (e.g. Codec.Text.Base64) because its role, like uuencoding, is to convert binary streams to 7-bit ASCII text i.e. transmissible by email.
I would have thought Codec.Binary.Base64, since in the other cases (Image and Video), the name is for the content you wish to code, not the format in which it is encoded. e.g. Jpeg is a format for encoding an image in binary, while xpm is a format for encoding an image as text, but both would go under Codec.Image.
I initially thought along these lines, but then concluded that it's not that simple (or at least, that's not the only interpretation of the classification). For example, Jpeg is a coding system which encodes raw binary image data into jpeg image data: both the source and encoded result are image data, and they're both binary. So the term 'Image' refers to the purpose of the codec, not the source or destination format. Looking at it this way, 'Text' is a reasonable classification for a codec that encodes arbitrary raw binary data into ascii text: the purpose of the codec is to generate text. Ok, it's a little bit flimsy, but IMHO better than Codec.Binary which doesn't tell you anything: most codecs take binary input. Cheers, Simon

"Simon Marlow"
I would have thought Codec.Binary.Base64, since in the other cases (Image and Video), the name is for the content you wish to code
I initially thought along these lines, but then concluded that it's not that simple (or at least, that's not the only interpretation of the classification).
Is a deep hierarchy really necessary? Intuitively, a good hierarchy makes things easier to find, but as soon as location becomes slightly ambigous, a hierarchy becomes counter-productive: there are just a lot more places to look. As far as I can tell, the point of a hierarchy is to avoid name clashes, please don't make it deeper or more complex than what is necessary to achieve that goal. So, IMHO, Codec.Base64 is good (deep) enough. -kzm -- If I haven't seen further, it is by standing in the footprints of giants
participants (2)
-
ketil@ii.uib.no
-
Simon Marlow