Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to optimize VCDIFF decoder when VCD_TARGET will not be used as source segment #9

Closed
Steelskin opened this issue Sep 19, 2014 · 0 comments

Comments

@Steelskin
Copy link
Contributor

Original issue 9 created by openvcdiff on 2008-09-11T23:24:54.000Z:

The open-vcdiff decoder currently supports the full VCDIFF format as
specified in RFC 3284. The open-vcdiff encoder uses only a subset of the
features available in that format.

One example is using target data as the source segment. RFC 3284 allows
each delta window to specify one source segment to be referenced by COPY
instructions. This source segment can come either from the dictionary
(also known as source file) or from anywhere in the previously decoded
target file. The latter possibility means that the decoder must preserve
the entire contents of the previously decoded target file in memory, or at
least be prepared to load any given portion of the target file into memory
on demand.

The open-vcdiff encoder will never use the previously decoded target file
as the source window. It always uses a source window that starts at offset
0 of the dictionary and includes the entire dictionary contents.

If the decoder could be guaranteed that the encoder would never send a
delta window that used previously decoded target data as the source window,
then it would no longer have to save the previously decoded target file in
memory, resulting in significant memory savings and eliminating one memcpy
operation.

Proposal: add a decoder option that prohibits the use of VCD_TARGET as the
source window type. If this option were enabled and a delta window
containing the VCD_TARGET flag were passed to the decoder, it would fail
with a decoding error.

The Xdelta encoder (another open-source VCDIFF package) does not use
VCD_TARGET either, according to its author.

A restriction has been added to the Appendix of the SDCH protocol
(http://sdch.googlegroups.com/web/Shared_Dictionary_Compression_over_HTTP.pdf)
to prohibit the use of VCD_TARGET for the VCDIFF source segment in the
context of SDCH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant