Mercurial > hg
comparison mercurial/revlog.py @ 31356:ef6888172437
revlog: extract first byte of revlog with a slice so it's portable
author | Augie Fackler <augie@google.com> |
---|---|
date | Sun, 12 Mar 2017 00:49:49 -0500 |
parents | 08b34c3a6f74 |
children | c233cbda5b1e |
comparison
equal
deleted
inserted
replaced
31355:77270ec0cdd9 | 31356:ef6888172437 |
---|---|
1519 # compression engines." That is why we have the inline lookup first | 1519 # compression engines." That is why we have the inline lookup first |
1520 # followed by the compengines lookup. | 1520 # followed by the compengines lookup. |
1521 # | 1521 # |
1522 # According to `hg perfrevlogchunks`, this is ~0.5% faster for zlib | 1522 # According to `hg perfrevlogchunks`, this is ~0.5% faster for zlib |
1523 # compressed chunks. And this matters for changelog and manifest reads. | 1523 # compressed chunks. And this matters for changelog and manifest reads. |
1524 t = data[0] | 1524 t = data[0:1] |
1525 | 1525 |
1526 if t == 'x': | 1526 if t == 'x': |
1527 try: | 1527 try: |
1528 return _zlibdecompress(data) | 1528 return _zlibdecompress(data) |
1529 except zlib.error as e: | 1529 except zlib.error as e: |