Page 1 of 1

algorithm in Java

Posted: Fri Aug 24, 2012 12:03 pm
by irgangla
Hi,
has someone of you solved the puzzle with a Java programm? I have problems with downloading the levels higher than 500 at once and it seems if I resume the download with the range header I get unsolveable levels. Had someone the same problem and was able to solve it?

Greetings,
irgangla

Posted: Thu Jun 27, 2013 6:13 pm
by m!nus
To anyone who comes across this problem: The webserver doesn't deliver the whole response, thus you get an incomplete board. I had this problem with my Python implementation too. You have to accept gzipped content, then it works just fine

Code: Select all

request = Request(url)
request.add_header('Accept-encoding', 'gzip')
res = self.opener.open(request)
ret = res.read()
if res.getheader("Content-Encoding") == "gzip":
	ret = gzip.decompress(ret)