My server uses some kind of templates to build response something like:...SomeConstantPart001$(TokenToReplace001)SomeVeryLongConstantPart001$(TokenToReplace002)SomeConstantPart002The $(...) stuff is a part which replaced at runtime, the rest are constant parts. Here are questions:
- Can I cut out these "SomeConstantPartXXX" and dump all of them into file which will be my dictionary instead of running something like femtozip to build the dictionary?
- I dont think it is wise to encode the whole body at runtime, looks like I just can replace constant parts with delta instructions since I know where the data resides in dictionary, right?
- I've encountered somewhat odd behavior, I see relatively short string, say 10 bytes are not replaced. Even when I encode the dictionary itself using the same dictionary, which theoretically would leave me with file free of any string and just delta instruction, is it correct?
--
You received this message because you are subscribed to the Google Groups "SDCH" group.
To unsubscribe from this group and stop receiving emails from it, send an email to SDCH+uns...@googlegroups.com.
To post to this group, send email to SD...@googlegroups.com.
Visit this group at https://groups.google.com/group/SDCH.
For more options, visit https://groups.google.com/d/optout.
>> That is reasonable as long as you also use proper VCDIFF instructions for literal content (TokenToReplaceXXX) as well. I would still suggest using the encoder to ensure that it provides the proper checksums, byte counts, etc.Totally agree! But I would like to skip the string matching part. Is there a way to "feed" artificially "matches" for the encoder to do the rest of the work - create delta instructions, counts and the proper file structure in whole?
var ebPtcl="http://",ebBigS="
var ebPtcl="http://",ebBigS="blah-blah some long string"
- I've encountered somewhat odd behavior, I see relatively short string, say 10 bytes are not replaced. Even when I encode the dictionary itself using the same dictionary, which theoretically would leave me with file free of any string and just delta instruction, is it correct?
Please read the description of kBlockSize in the open-vcdiff source code:
Checked the kBlockSize, as I understand this block defines minimal substring to encode however i have following data in dictionary
var ebPtcl="http://",ebBigS="
and server response has a stringvar ebPtcl="http://",ebBigS="blah-blah some long string"
however the string before the "blah-blah" stuff is not being encoded. is it expected behavior?
--