Bit string encoder for mder