SevenZip/sdk/Compress/LZ/LzInWindow.cs
/// <summary>
///   index + limit have not to exceed _keepSizeAfter
/// </summary>
/// <param name = "index"></param>
/// <param name = "distance"></param>
/// <param name = "limit"></param>
/// <returns></returns>
index + limit have not to exceed _keepSizeAfter
index + limit have not to exceed _keepSizeAfter
public UInt32 GetMatchLen(Int32 index, UInt32 distance, UInt32 limit)
        {
            if (_streamEndWasReached)
                if ((_pos + index) + limit > _streamPos)
                    limit = _streamPos - (UInt32) (_pos + index);
            distance++;
            UInt32 pby = _bufferOffset + _pos + (UInt32) index;
            UInt32 i;
            for (i = 0; i < limit && _bufferBase[pby + i] == _bufferBase[pby + i - distance]; i++) ;
            return i;
        }
public UInt32 GetMatchLen ( Int32 index , UInt32 distance , UInt32 limit ) { if ( _streamEndWasReached ) if ( ( _pos + index ) + limit > _streamPos ) limit = _streamPos - ( UInt32 ) ( _pos + index ) ; distance ++ ; UInt32 pby = _bufferOffset + _pos + ( UInt32 ) index ; UInt32 i ; for ( i = 0 ; i < limit && _bufferBase [ pby + i ] == _bufferBase [ pby + i - distance ] ; i ++ ) ; return i ; }
index + limit have not to exceed _keepSizeAfter
index + limit have not to exceed _keepSizeAfter
// Byte *pby = _buffer + (size_t)_pos + index;
None
index
Int32
None
distance
UInt32
None
limit
UInt32
None