Talk:LZW Compression

From ModdingWiki
Jump to navigation Jump to search

The article states that some games are limited to 12-bit codes to save space, but it doesn't say what happens when this limit is reached (which I am having trouble trying to reverse engineer.) I can't figure out whether it resets the dictionary or just keeps adjusting the last entry. Any ideas? -- Malvineous 07:24, 19 September 2010 (GMT)

When a 12-bit dictionary is filled, it simply stops adding codes. Therefore, the compressor just continues using the longest string in the dictionary for output, but doesn't add any new codes. See my VB.NET implementation for details. Fleexy (talk) 23:10, 31 December 2013 (GMT)