With Huffman encoding we simply generate a map of symbol -> code. Then, when run-length encoding, we use this map to exchange a symbol with a code. This allows for easy mixing of codes with some other symbols that we didn't want to encode/compress. For instance in JPEG we encode [number of preceeding zeros, number of bits for AC coefficient] and put it to bitstream, followed by the AC coefficient bit representation. This is a very convenient property of Huffman encoding.
Now what I want to ask is if this is possible to do something similar with arithmetic encoding (in context of asymmetric numeral systems cause that's what I'm implementing)? I have no idea how to tackle this.