def rl_decode(buf):
	"""
	Uncompresses the buffer by adding the correct number of 1s identified by the digit after 0
	(since 0 indicates a repeated character when the original compression is performed).
	"""
	
	decoding = []
    
	for index, char in enumerate(buf):
		if char == 0:
			for repeats in range(buf[index+1]):
				decoding.append(1)
		else:
			if buf[index-1] != 0:
				decoding.append(char)
    
	return decoding