Definition
A (K,n) D-ary block code for the source is called uniquely decodable or lossless if the encoder: f:Xn→{0,1,⋯,D−1}Kis an invertible map (i.e. f is bijective) and g=f−1 (i.e. the decoder is the inverted map of the encoder).
A VLC is uniquely decodable (UD), (or lossless), if all finite sequences of source n-tuples are mapped onto distinct sequences of codewords (f(x1n),⋯,f(xKn))=(f(y1n),⋯,f(yK′n)) \mboxforK=K′\mboxandxin=yin, i=1,⋯,Kor that f is a injective map on all finite sequences of source n-tuples. In other words, any concatenation of codewords can be uniquely decoded.