go - Golang: can't decompress data with lzw package -
I am trying to create a compressed string pool with go. This is my code -
I can not put pressure on what is compressed with the compressed / LJW package. Input for Lzw.Writer [104 101 108 108 111 32 119 111 114 108 100] and production of lzw.Reader [0 0 3 3 3 2 0 0]. They definitely do not match.
I am making the reader and author with the same parameters (all except buffer). The buffer for the Lzw.Reader contains data, which was previously compressed with lzw.Writer.
your I do not know much about LZW, but it seems that how many bits are considered by See the minimum example of a LZW round-trip, a litWidth
lzw.NewReader and < parameter 2 to 8 for code> lzw.NewWriter
litwidth , so the value of 2 is that all input bytes Must be 0x00 - 0x03
litWidth of 7 tasks (but probably not safe for UTF-8 lessons), anything less than 7 fails .
Comments
Post a Comment