Mercurial > hg
comparison contrib/python-zstandard/zstd/dictBuilder/divsufsort.c @ 40121:73fef626dae3
zstandard: vendor python-zstandard 0.10.1
This was just released.
The upstream source distribution from PyPI was extracted. Unwanted
files were removed.
The clang-format ignore list was updated to reflect the new source
of files.
setup.py was updated to pass a new argument to python-zstandard's
function for returning an Extension instance. Upstream had to change
to use relative paths because Python 3.7's packaging doesn't
seem to like absolute paths when defining sources, includes, etc.
The default relative path calculation is relative to setup_zstd.py
which is different from the directory of Mercurial's setup.py.
The project contains a vendored copy of zstandard 1.3.6. The old
version was 1.3.4.
The API should be backwards compatible and nothing in core should
need adjusted. However, there is a new "chunker" API that we
may find useful in places where we want to emit compressed chunks
of a fixed size.
There are a pair of bug fixes in 0.10.0 with regards to
compressobj() and decompressobj() when block flushing is used. I
actually found these bugs when introducing these APIs in Mercurial!
But existing Mercurial code is not affected because we don't
perform block flushing.
# no-check-commit because 3rd party code has different style guidelines
Differential Revision: https://phab.mercurial-scm.org/D4911
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 08 Oct 2018 16:27:40 -0700 |
parents | 2e484bdea8c4 |
children |
comparison
equal
deleted
inserted
replaced
40120:89742f1fa6cb | 40121:73fef626dae3 |
---|---|
1635 if((0 < s) && (T[s - 1] > c0)) { s = ~s; } | 1635 if((0 < s) && (T[s - 1] > c0)) { s = ~s; } |
1636 if(c0 != c2) { | 1636 if(c0 != c2) { |
1637 if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } | 1637 if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } |
1638 k = SA + BUCKET_B(c2 = c0, c1); | 1638 k = SA + BUCKET_B(c2 = c0, c1); |
1639 } | 1639 } |
1640 assert(k < j); | 1640 assert(k < j); assert(k != NULL); |
1641 *k-- = s; | 1641 *k-- = s; |
1642 } else { | 1642 } else { |
1643 assert(((s == 0) && (T[s] == c1)) || (s < 0)); | 1643 assert(((s == 0) && (T[s] == c1)) || (s < 0)); |
1644 *j = ~s; | 1644 *j = ~s; |
1645 } | 1645 } |
1699 if((0 < s) && (T[s - 1] > c0)) { s = ~s; } | 1699 if((0 < s) && (T[s - 1] > c0)) { s = ~s; } |
1700 if(c0 != c2) { | 1700 if(c0 != c2) { |
1701 if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } | 1701 if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } |
1702 k = SA + BUCKET_B(c2 = c0, c1); | 1702 k = SA + BUCKET_B(c2 = c0, c1); |
1703 } | 1703 } |
1704 assert(k < j); | 1704 assert(k < j); assert(k != NULL); |
1705 *k-- = s; | 1705 *k-- = s; |
1706 } else if(s != 0) { | 1706 } else if(s != 0) { |
1707 *j = ~s; | 1707 *j = ~s; |
1708 #ifndef NDEBUG | 1708 #ifndef NDEBUG |
1709 } else { | 1709 } else { |
1783 if((0 < s) && (T[s - 1] > c0)) { s = ~s; } | 1783 if((0 < s) && (T[s - 1] > c0)) { s = ~s; } |
1784 if(c0 != c2) { | 1784 if(c0 != c2) { |
1785 if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } | 1785 if(0 <= c2) { BUCKET_B(c2, c1) = k - SA; } |
1786 k = SA + BUCKET_B(c2 = c0, c1); | 1786 k = SA + BUCKET_B(c2 = c0, c1); |
1787 } | 1787 } |
1788 assert(k < j); | 1788 assert(k < j); assert(k != NULL); |
1789 *k-- = s; | 1789 *k-- = s; |
1790 } else if(s != 0) { | 1790 } else if(s != 0) { |
1791 *j = ~s; | 1791 *j = ~s; |
1792 #ifndef NDEBUG | 1792 #ifndef NDEBUG |
1793 } else { | 1793 } else { |