util.py
def decompress(compressed, uncompressed):
	'''First, read a Huffman tree from the 'compressed' stream using your
	read_tree function. Then use that tree to decode the rest of the
	stream and write the resulting symbols to the 'uncompressed'
	stream.

	Args:
	compressed: A file stream from which compressed input is read.
	uncompressed: A writable file stream to which the uncompressed
	output is written.

	'''

	#let compressed be an instance of bitio.BitReader
	reading = bitio.BitReader(compressed)
	#use read_tree to get the huffman tree
	tree = read_tree(reading)
	#let uncompressed be an instance of bitio.BitWriter
	Target = bitio.BitWriter(uncompressed)

	while True:
		#get the value of leaf
		val = decode_byte(tree, reading)
		
		#if EOF just break
		if val is None:
			break

		#write the value of leaf to uncompressed file
		Target.writebits(val,8)

	Target.flush()
First, read a Huffman tree from the 'compressed' stream using your
	read_tree function. Then use that tree to decode the rest of the
	stream and write the resulting symbols to the 'uncompressed'
	stream.

	Args:
	compressed: A file stream from which compressed input is read.
	uncompressed: A writable file stream to which the uncompressed
	output is written.

	
First, read a Huffman tree from the 'compressed' stream using your
read_tree function. Then use that tree to decode the rest of the
stream and write the resulting symbols to the 'uncompressed'
stream.

A file stream from which compressed input is read.
uncompressed: A writable file stream to which the uncompressed
output is written.
First read a Huffman tree from the ' compressed ' stream using your read_tree function . Then use that tree to decode the rest of the stream and write the resulting symbols to the ' uncompressed ' stream . A file stream from which compressed input is read . uncompressed : A writable file stream to which the uncompressed output is written .
def decompress(compressed, uncompressed):
	reading = bitio.BitReader(compressed)
	tree = read_tree(reading)
	Target = bitio.BitWriter(uncompressed)
	while True:
		val = decode_byte(tree, reading)
		if val is None:
			break
		Target.writebits(val,8)
	Target.flush()
def decompress ( compressed , uncompressed ) : reading = bitio . BitReader ( compressed ) tree = read_tree ( reading ) Target = bitio . BitWriter ( uncompressed ) while True : val = decode_byte ( tree , reading ) if val is None : break Target . writebits ( val , 8 ) Target . flush ( )
First, read a Huffman tree from the 'compressed' stream using your
read_tree function.
First read a Huffman tree from the ' compressed ' stream using your read_tree function .
'''First, read a Huffman tree from the 'compressed' stream using your
	read_tree function. Then use that tree to decode the rest of the
	stream and write the resulting symbols to the 'uncompressed'
	stream.

	Args:
	compressed: A file stream from which compressed input is read.
	uncompressed: A writable file stream to which the uncompressed
	output is written.

	''' #let compressed be an instance of bitio.BitReader #use read_tree to get the huffman tree #let uncompressed be an instance of bitio.BitWriter #get the value of leaf #if EOF just break #write the value of leaf to uncompressed file
compressed
uncompressed