On Mar 17, 8:27 am, Dave <test1...@gmail.com
> 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: 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.