Jump to content

LZW compression: Difference between revisions

Line 276:
# Build the dictionary.
dict_size = 256
dictionary = {}dict((chr(i), chr(i)) for i in xrange(dict_size))
for i in xrange(dict_size):
dictionary[chr(i)] = chr(i)
 
w = result = compressed.popleft()
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.