Update zlib-intel to v1.2.11.1_jtkv6.3 (dotnet/corefx#36795)
authorEric StJohn <ericstj@microsoft.com>
Fri, 12 Apr 2019 13:20:07 +0000 (06:20 -0700)
committerStephen Toub <stoub@microsoft.com>
Fri, 12 Apr 2019 13:20:07 +0000 (09:20 -0400)
commit2e24e5f99b30049fa133201ded8153a86f05c4b7
treea1fdc1a48e2ed0fdc18f668def7da41522b6af5f
parenta0c9a2962c7a17f9c5ea2be2b0df01efb406c259
Update zlib-intel to v1.2.11.1_jtkv6.3 (dotnet/corefx#36795)

* inflate: handle windowBits == 16

* deflate_medium: add dist -1 to hash even for long matches

This fixes an issue where a repeat sequence longer than 258 would be
encoded using longer distance values after the first match.

* deflate_medium: avoid emitting a suboptimal literal in the restart case

When we load new data into the window, we invalidate the next match, in
case the match would improve. In this case, the hash has already been
updated with this data, so when we look for a new match it will point
it back at itself. As a result, a literal is generated even when a
better match is available.

This avoids that by catching this case and ensuring we're looking at the
past.

Commit migrated from https://github.com/dotnet/corefx/commit/6322a406f88e854c5b827ab838f988f8992048f8
src/libraries/Native/Windows/clrcompression/zlib-intel/deflate_medium.c
src/libraries/Native/Windows/clrcompression/zlib-intel/inflate.c