b._groupcompress_py : module documentation

Part of bzrlib

Python version of compiled extensions for doing compression.

We separate the implementation from the groupcompress.py to avoid importing useless stuff.

Class LinesDeltaIndex This class indexes matches between strings.
Function encode_base128_int Convert an integer into a 7-bit lsb encoding.
Function decode_base128_int Decode an integer from a 7-bit lsb encoding.
Function encode_copy_instruction Convert this offset into a control code and bytes.
Function decode_copy_instruction Decode a copy instruction from the next few bytes.
Function make_delta Create a delta from source to target.
Function apply_delta Apply delta to this object to become new_version_id.
Function apply_delta_to_source Extract a delta from source bytes, and apply it.
Class _OutputHandler A simple class which just tracks how to split up an insert request.
def encode_base128_int(val):
Convert an integer into a 7-bit lsb encoding.
def decode_base128_int(bytes):
Decode an integer from a 7-bit lsb encoding.
def encode_copy_instruction(offset, length):
Convert this offset into a control code and bytes.
def decode_copy_instruction(bytes, cmd, pos):
Decode a copy instruction from the next few bytes.

A copy instruction is a variable number of bytes, so we will parse the bytes we care about, and return the new position, as well as the offset and length referred to in the bytes.

ParametersbytesA string of bytes
cmdThe command code
posThe position in bytes right after the copy command
Returns(offset, length, newpos) The offset of the copy start, the number of bytes to copy, and the position after the last byte of the copy
def make_delta(source_bytes, target_bytes):
Create a delta from source to target.
def apply_delta(basis, delta):
Apply delta to this object to become new_version_id.
def apply_delta_to_source(source, delta_start, delta_end):
Extract a delta from source bytes, and apply it.
API Documentation for Bazaar, generated by pydoctor at 2019-07-23 00:29:00.