Where can I find out more about Blob?

gk.chart.data is a Blob which contains a GZIP compressed byte string.
After decompression I convert it to unicode:

url = unicode(gk.chart.data.decode('zlib'), "utf-8")


Here is AppEngines response:

  File "C:\python25\lib\encodings\zlib_codec.py", line 43, in
zlib_decode
    output = zlib.decompress(input)
error: Error -3 while decompressing data: incorrect header check


On Nov 9, 3:47 pm, Duncan <[EMAIL PROTECTED]> wrote:
> On Nov 9, 1:50 pm, jago <[EMAIL PROTECTED]> wrote:
>
> > Is it possible to retrieve these blobs from the datastore and un-gzip
> > these blobs into Strings inside the AppEngine?
>
> > How do I do the un-gzipping?
>
> decoded = blob.decode('zlib')
>
> That will give you a byte string so you'll probably want to further
> decode it to unicode with whatever encoding was used when originally
> creating the string.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to