func decompress(from []byte) []byte { const ( order = 3 mixer = 0xff51afd7ed558ccd nbits = 12 ) var ( at = 0 ct = len(from) ctx = uint64(0) lut [1 << nbits]byte to []byte ) for at < ct { ctrl := int(from[at]) for bit := 128; bit != 0; bit >>= 1 { var next byte hash := ctx * mixer hash >>= 64 - nbits if ctrl&bit == 0 { if at == ct { return to } next = from[at] at++ lut[hash] = next } else { next = lut[hash] } ctx <<= 8 ctx += uint64(next) ctx &= 1<<(order*8) - 1 to = append(to, next) } } return to }
To receive a hint, submit unfixed code.