10 messages in com.googlegroups.google-gearsRe: [google-gears] Re: Using HttpRequ...| From | Sent On | Attachments |
|---|---|---|
| Owen | 09 Jan 2008 19:58 | |
| Owen Barnett | 09 Jan 2008 22:08 | |
| Chris Prince | 09 Jan 2008 22:59 | |
| Owen Barnett | 10 Jan 2008 05:10 | |
| Chris Thatcher | 10 Jan 2008 06:07 | |
| Jeremy Moskovich | 10 Jan 2008 10:46 | |
| Chris Prince | 10 Jan 2008 11:15 | |
| Dimitri Glazkov | 10 Jan 2008 11:23 | |
| Owen Barnett | 10 Jan 2008 11:59 | |
| Chris Prince | 10 Jan 2008 12:19 |
| Subject: | Re: [google-gears] Re: Using HttpRequest for binary data.![]() |
|---|---|
| From: | Jeremy Moskovich (play...@google.com) |
| Date: | 01/10/2008 10:46:09 AM |
| List: | com.googlegroups.google-gears |
How about providing an API to deconstruct binary data from JS, so you can say something like:
dataFormat [ utf8chars[4] formatID, int32 version, float someValue, ... binaryData[...] uninterestingData]
jsDict = gears.parse(dataFormat, blob).
if (jsDict['version'] == 3)...
Binary data comes back as base64, but can then be transformed into a blob and be further deconstructed (so for example, you can go through a list of records one by one).
This would allow manipulation of binary data formats from JS which would seem rather useful (JS EXIF reader/MP3 tagger, etc?).
Best regards, Jeremy
On Jan 10, 2008 6:07 AM, Chris Thatcher <chri...@comcast.net> wrote:
What about using a base64 encoding routine on the binary data? That was the old school soap method of handling binary in xml (until mtom became the standard). It makes stuff larger, 33% larger, but it's a simple work around for passing the data as a string from the workers. Chris Thatcher (cell) 202 340 9685 chri...@comcast.net c....@loc.gov
On Jan 10, 2008, at 8:10 AM, Owen Barnett wrote:
Out of curiosity, what kind of payloads have mixed binary and textual data, and have the characteristic that you only want to compare the non-binary parts?
--Chris
I've been playing around with some ideas for javascript browser utilities that do some processing on .torrent files. The file is mostly text, and I could even interact with the tracker using HttpRequest, but the info hash has the following field:
# pieces: string consisting of the concatenation of all 20-byte SHA1 hash values, one per piece (byte string)
which trips me up.
-Owen




