codecs are made thread safe.