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

Handle COPY commands as per open-vcdiff implementation. #2

Merged
merged 1 commit into from
Jan 24, 2015

Conversation

pwiebe
Copy link
Contributor

@pwiebe pwiebe commented Aug 19, 2014

The COPY command can copy data from:

  • source only
  • source and target
  • target only.
    The original implementation assumed source only.

@@ -13,7 +13,7 @@ class Decoder
attr_accessor :dictionary

def initialize(dictionary)
@dictionary = File.read(dictionary, mode: "rb")
@dictionary = File.new(dictionary, 'rb').read
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change should be taken out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. I added this before the last PR.

@aprescott
Copy link
Owner

@pwiebe could you add tests covering the new functionality?

@@ -132,6 +133,7 @@ def process_delta_encoding(source_window, delta_encoding)
target_window << (add_run_data[add_run_index, instruction_size_1]).pack("C*")
add_run_index += instruction_size_1
when CodeTable::COPY

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather this line not be added.

@aprescott
Copy link
Owner

Thanks for the PR! I really like that this is implementing more of the VCDIFF spec!

@aprescott
Copy link
Owner

I'll get Travis integrated through a separate PR so I can get build checking on branches.

@paynerc
Copy link
Contributor

paynerc commented Aug 20, 2014

👍 Phil!

@aprescott
Copy link
Owner

@pwiebe could you squash these 3 commits and rebase them off the latest master? test/ is now spec/ so you'll need to account for that. Additionally, I assume that the implementation change here is aiming to follow Section 3 of RFC 3284 concerning crossing the boundary between S and T?

@@ -159,7 +160,7 @@ def process_delta_encoding(source_window, delta_encoding)
# same[(m - (s_near+2))*256 + b]".
#

here = target_window.length - 1
here = window.source_data_length + target_window.length
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a rogue space at the end of this line.

…RFC 3284 concerning the boundary between S and T).
@paynerc
Copy link
Contributor

paynerc commented Jan 21, 2015

Any movement on this?

@aprescott
Copy link
Owner

I missed that the commits had been squashed. I'll get to looking at this again soon!

aprescott added a commit that referenced this pull request Jan 24, 2015
Handle COPY commands as per open-vcdiff implementation.
@aprescott aprescott merged commit 87e3f5b into aprescott:master Jan 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants