Part of bzrlib.groupcompress View In Hierarchy
This tracks the meta info (start of text, length, type, etc.)
Method | __init__ | Undocumented |
Method | __len__ | Undocumented |
Class Method | from_bytes | Undocumented |
Method | extract | Extract the text for a specific key. |
Method | set_chunked_content | Set the content of this block to the given chunks. |
Method | set_content | Set the content of this block. |
Method | to_chunks | Create the byte stream as a series of 'chunks' |
Method | to_bytes | Encode the information into a byte stream. |
Method | _ensure_content | Make sure that content has been expanded enough. |
Method | _parse_bytes | Read the various lengths from the header. |
Method | _z_content | Return z_content_chunks as a simple string. |
Method | _create_z_content_using_lzma | Undocumented |
Method | _create_z_content_from_chunks | Undocumented |
Method | _create_z_content | Undocumented |
Method | _dump | Take this block, and spit out a human-readable structure. |
Parameters | num_bytes | Ensure that we have extracted at least num_bytes of content. If None, consume everything |
This also populates the various 'compressed' buffers.
Returns | The position in bytes just after the last newline |
Meant only to be used by the test suite.
Parameters | key | The label used for this content |
sha1 | TODO (should we validate only when sha1 is supplied?) | |
Returns | The bytes for the content |
Parameters | include_text | Inserts also include text bits, chose whether you want this displayed in the dump or not. |
Returns | A dump of the given block. The layout is something like: [('f', length), ('d', delta_length, text_length, [delta_info])] delta_info := [('i', num_bytes, text), ('c', offset, num_bytes), ...] |