Re-implemented PrefixDecoderImpl in Scala: PrefixDecoderTrait.