Bad episode XML

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
Omertron
Posts: 9
Joined: Thu Mar 26, 2009 11:31 pm

Tue Nov 22, 2011 11:54 pm

Shame I am using java :)

I have determined that it is indeed gzip compressed data. Do you know if it's all gzip or just the content?
lpwcomp
Posts: 16
Joined: Sun Oct 30, 2011 8:20 pm

Wed Nov 23, 2011 6:56 am

Omertron wrote:Shame I am using java :)

I have determined that it is indeed gzip compressed data. Do you know if it's all gzip or just the content?
So far, the only time I am seeing it is when getting the XML for an episode.

For Java, you should be able to use java.util.zip.GZIPInputStream

Oh, and I actually looked it up and the gzip signature is the first two bytes = 1f8b rather than the first 3 being 1f8b08. The 08 is the compression method used so I have changed my code appropriately.
Omertron
Posts: 9
Joined: Thu Mar 26, 2009 11:31 pm

Wed Nov 23, 2011 7:48 am

I'm using URLConnection so I can do a urlconnection.getContentEncoding() which returns "null" for standard HTTP and "gzip" for the zipped content.

Just need to figure out how to read the content now
Omertron
Posts: 9
Joined: Thu Mar 26, 2009 11:31 pm

Wed Nov 23, 2011 11:03 am

Fixed it. Works great
Post Reply