Arithmetic coding is a lossless data compression technique that encodes data as a single real number between 0 and 1. It maps a string of symbols to a fractional number, with more probable symbols represented by larger fractional ranges. Encoding involves repeatedly dividing the interval based on symbol probabilities, and the final encoded number represents the entire string. Decoding reconstructs the string by comparing the number to symbol probability ranges. Arithmetic coding achieves compression closer to the entropy limit than Huffman coding by spreading coding inefficiencies across all symbols of the data.