Part of bzrlib._groupcompress_py View In Hierarchy
Instance Variables | lines | The 'static' lines that will be preserved between runs. |
_matching_lines | A dict of {line:[matching offsets]} | |
line_offsets | The byte offset for the end of each line, used to quickly map between a matching line number and the byte location | |
endpoint | The total number of bytes in self.line_offsets |
Method | __init__ | Undocumented |
Method | get_matches | Return the lines which match the line in right. |
Method | get_matching_blocks | Return the ranges in lines which match self.lines. |
Method | extend_lines | Add more lines to the left-lines list. |
Method | make_delta | Compute the delta for this content versus the original content. |
Method | _update_matching_lines | Undocumented |
Method | _get_longest_match | Look at all matches for the current line, return the longest. |
Method | _flush_insert | Add an 'insert' request to the data stream. |
Method | _flush_copy | Undocumented |
Parameters | lines | The lines we are matching against |
pos | The current location we care about | |
locations | A list of lines that matched the current location. This may be None, but often we'll have already found matches for this line. | |
Returns | (start_in_self, start_in_lines, num_lines) All values are the offset in the list (aka the line number) If start_in_self is None, then we have no matches, and this line should be inserted in the target. |
Parameters | lines | lines to compress |
Returns | A list of (old_start, new_start, length) tuples which reflect a region in self.lines that is present in lines. The last element of the list is always (old_len, new_len, 0) to provide a end point for generating instructions from the matching blocks list. |
Parameters | lines | A list of lines to add |
index | A True/False for each node to define if it should be indexed. |