Show More
@@ -1958,31 +1958,31 b' def applybindelta(binchunk, data):' | |||||
1958 | binchunk = binchunk[s:] |
|
1958 | binchunk = binchunk[s:] | |
1959 | i = 0 |
|
1959 | i = 0 | |
1960 | while i < len(binchunk): |
|
1960 | while i < len(binchunk): | |
1961 | cmd = ord(binchunk[i]) |
|
1961 | cmd = ord(binchunk[i:i + 1]) | |
1962 | i += 1 |
|
1962 | i += 1 | |
1963 | if (cmd & 0x80): |
|
1963 | if (cmd & 0x80): | |
1964 | offset = 0 |
|
1964 | offset = 0 | |
1965 | size = 0 |
|
1965 | size = 0 | |
1966 | if (cmd & 0x01): |
|
1966 | if (cmd & 0x01): | |
1967 | offset = ord(binchunk[i]) |
|
1967 | offset = ord(binchunk[i:i + 1]) | |
1968 | i += 1 |
|
1968 | i += 1 | |
1969 | if (cmd & 0x02): |
|
1969 | if (cmd & 0x02): | |
1970 | offset |= ord(binchunk[i]) << 8 |
|
1970 | offset |= ord(binchunk[i:i + 1]) << 8 | |
1971 | i += 1 |
|
1971 | i += 1 | |
1972 | if (cmd & 0x04): |
|
1972 | if (cmd & 0x04): | |
1973 | offset |= ord(binchunk[i]) << 16 |
|
1973 | offset |= ord(binchunk[i:i + 1]) << 16 | |
1974 | i += 1 |
|
1974 | i += 1 | |
1975 | if (cmd & 0x08): |
|
1975 | if (cmd & 0x08): | |
1976 | offset |= ord(binchunk[i]) << 24 |
|
1976 | offset |= ord(binchunk[i:i + 1]) << 24 | |
1977 | i += 1 |
|
1977 | i += 1 | |
1978 | if (cmd & 0x10): |
|
1978 | if (cmd & 0x10): | |
1979 | size = ord(binchunk[i]) |
|
1979 | size = ord(binchunk[i:i + 1]) | |
1980 | i += 1 |
|
1980 | i += 1 | |
1981 | if (cmd & 0x20): |
|
1981 | if (cmd & 0x20): | |
1982 | size |= ord(binchunk[i]) << 8 |
|
1982 | size |= ord(binchunk[i:i + 1]) << 8 | |
1983 | i += 1 |
|
1983 | i += 1 | |
1984 | if (cmd & 0x40): |
|
1984 | if (cmd & 0x40): | |
1985 | size |= ord(binchunk[i]) << 16 |
|
1985 | size |= ord(binchunk[i:i + 1]) << 16 | |
1986 | i += 1 |
|
1986 | i += 1 | |
1987 | if size == 0: |
|
1987 | if size == 0: | |
1988 | size = 0x10000 |
|
1988 | size = 0x10000 |
General Comments 0
You need to be logged in to leave comments.
Login now