edit: On second thought this is probably a bijection and you can call it "arithmetic coding" in either direction.
As far as I can tell, arithmetic coding needs both a compressor and a decompressor. Otherwise it's relatively useless in eg your fancy video file format.
In this case the algorithm says you return tails unless you flip 7 heads in a row (which happens with probability 1/128).
Though I can see an interesting problem:
You have a known unbiased coin, and a biased coin with unknown p.
Your task is to create a stream of coin flips with bias p. You want to minimize how often you have to flip the biased coin; and somehow work out a way to make use of the unbiased coin to 'stretch' your sequence of biased coin flips.
I am not sure if this is possible.