Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
First steps
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dave  
View profile  
 More options Mar 17 2009, 11:27 am
From: Dave <test1...@gmail.com>
Date: Tue, 17 Mar 2009 08:27:37 -0700 (PDT)
Local: Tues, Mar 17 2009 11:27 am
Subject: First steps
How do I decompress a HTTP response buffer encoded with SDCH?  The
resposne was generated using IE7 and the Google Toolbar.  Unzipping
the buffer I see the server ID as well as the response, but when I
pass that to vcdiff I'm getting a number of different errors depending
on what I try.  For one, the dictionary specified appears to be
embedded in an archive, indexed with dictionaries.txt.  Passing in
what seems to be the entire cached archive generates the following
error:

ERROR: Target data does not match checksum; this could mean that the
wrong dictionary was used

I assume I need to remove the 8 byte server ID and terminating null.
Do I also need to extract a subset dictionary from the archive?

Any help would be appreciated


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lincoln  
View profile  
 More options Mar 17 2009, 12:00 pm
From: Lincoln <openvcd...@gmail.com>
Date: Tue, 17 Mar 2009 09:00:04 -0700 (PDT)
Local: Tues, Mar 17 2009 12:00 pm
Subject: Re: First steps
Hi Dave:

On Mar 17, 8:27 am, Dave <test1...@gmail.com> wrote:

> How do I decompress a HTTP response buffer encoded with SDCH?  The
> response was generated using IE7 and the Google Toolbar.  Unzipping
> the buffer I see the server ID as well as the response, but when I
> pass that to vcdiff I'm getting a number of different errors depending
> on what I try.  For one, the dictionary specified appears to be
> embedded in an archive, indexed with dictionaries.txt.  Passing in
> what seems to be the entire cached archive generates the following
> error:

> ERROR: Target data does not match checksum; this could mean that the
> wrong dictionary was used

> I assume I need to remove the 8 byte server ID and terminating null.

Yes, you need to remove the first nine bytes (the server ID and
terminating null character) from the response.

> Do I also need to extract a subset dictionary from the archive?

Yes.  You will see that the first few lines of the dictionary file
contain SDCH headers such as "Domain:" and "Path:".  After the last of
these headers, there will be a blank line.  If you are trying to
decode the response by hand, you should remove all the headers plus
the blank line, and use the remaining file contents as the
dictionary.  It is better to use a command like "tail --lines=+4" to
remove the first few lines rather than using a text editor, because a
text editor will sometimes try to add or remove line-feed characters
and so corrupt the dictionary.

lincoln


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jim Roskind  
View profile  
 More options Mar 17 2009, 12:56 pm
From: Jim Roskind <j...@chromium.org>
Date: Tue, 17 Mar 2009 09:56:51 -0700
Local: Tues, Mar 17 2009 12:56 pm
Subject: Re: First steps

If you read C++, you can also look at the chromium implementation which is
built atop Lincoln's Open-VCDIFF.  For example, take a look at the following
to see a series of calls to process data (after it is gunzipped):
http://src.chromium.org/viewvc/chrome/trunk/src/net/base/sdch_filter.h
http://src.chromium.org/viewvc/chrome/trunk/src/net/base/sdch_filter.cc

Pay especially close attention to:

Filter::FilterStatus SdchFilter::ReadFilteredData(char* dest_buffer,
                                                  int* dest_len) {... }

which translates data from a pre-filled buffer in a member variable and puts
the decoded results into the supplied dest_buffer.

There is some related support code in:

http://src.chromium.org/viewvc/chrome/trunk/src/net/base/sdch_manager.h
http://src.chromium.org/viewvc/chrome/trunk/src/net/base/sdch_manager.cc

Finally, there is some support code for handling dictionaries in:

http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/sd...

http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/sd...

Hopefully those URLs will give you enough insight that you'll be able
navigate further as needed in the codebase.

Hope that helps,

Jim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »