Part of bzrlib.groupcompress View In Hierarchy
Known subclasses: bzrlib.groupcompress.PyrexGroupCompressor, bzrlib.groupcompress.PythonGroupCompressor
Method | __init__ | Create a GroupCompressor. |
Method | compress | Compress lines with label key. |
Method | extract | Extract a key previously added to the compressor. |
Method | flush | Finish this group, creating a formatted stream. |
Method | pop_last | Call this if you want to 'revoke' the last compression. |
Method | ratio | Return the overall compression ratio. |
Method | _compress | Compress lines with label key. |
Parameters | key | A key tuple. It is stored in the output for identification of the text during decompression. If the last element is 'None' it is replaced with the sha1 of the text - e.g. sha1:xxxxxxx. |
bytes | The bytes to be compressed | |
expected_sha | If non-None, the sha the lines are believed to have. During compression the sha is calculated; a mismatch will cause an error. | |
nostore_sha | If the computed sha1 sum matches, we will raise ExistingContent rather than adding the text. | |
soft | Do a 'soft' compression. This means that we require larger ranges to match to be considered for a copy command. | |
Returns | The sha1 of lines, the start and end offsets in the delta, and the type ('fulltext' or 'delta'). | |
See Also |
Parameters | key | A key tuple. It is stored in the output for identification of the text during decompression. |
bytes | The bytes to be compressed | |
max_delta_size | The size above which we issue a fulltext instead of a delta. | |
soft | Do a 'soft' compression. This means that we require larger ranges to match to be considered for a copy command. | |
Returns | The sha1 of lines, the start and end offsets in the delta, and the type ('fulltext' or 'delta'). |
Parameters | key | The key to extract. |
Returns | An iterable over bytes and the sha1. |
After calling this, the compressor should no longer be used