mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-24 10:40:49 +00:00
better
This commit is contained in:
parent
d25d12d7d4
commit
60dd53784f
@ -467,13 +467,13 @@ bool NO_INLINE decompressImpl(
|
||||
/// output: xyzHello, w
|
||||
/// ^-op (we will overwrite excessive bytes on next iteration)
|
||||
|
||||
{
|
||||
auto * target = std::min(copy_end, output_end);
|
||||
wildCopy<copy_amount>(op, ip, target); /// Here we can write up to copy_amount - 1 bytes after buffer.
|
||||
if (unlikely(copy_end > output_end))
|
||||
return false;
|
||||
|
||||
if (target == output_end)
|
||||
return true;
|
||||
}
|
||||
wildCopy<copy_amount>(op, ip, copy_end); /// Here we can write up to copy_amount - 1 bytes after buffer.
|
||||
|
||||
if (copy_end == output_end)
|
||||
return true;
|
||||
|
||||
ip += length;
|
||||
op = copy_end;
|
||||
@ -531,8 +531,9 @@ bool NO_INLINE decompressImpl(
|
||||
copy<copy_amount>(op, match); /// copy_amount + copy_amount - 1 - 4 * 2 bytes after buffer.
|
||||
if (length > copy_amount * 2)
|
||||
{
|
||||
auto * target = std::min(copy_end, output_end);
|
||||
wildCopy<copy_amount>(op + copy_amount, match + copy_amount, target);
|
||||
if (unlikely(copy_end > output_end))
|
||||
return false;
|
||||
wildCopy<copy_amount>(op + copy_amount, match + copy_amount, copy_end);
|
||||
}
|
||||
|
||||
op = copy_end;
|
||||
|
Loading…
Reference in New Issue
Block a user