Index: Lib/gzip.py =================================================================== --- Lib/gzip.py (revision 87951) +++ Lib/gzip.py (working copy) @@ -5,10 +5,14 @@ # based on Andrew Kuchling's minigzip.py distributed with the zlib module -import struct, sys, time, os +import os +import struct +import sys +import time import zlib import builtins import io +from warnings import warn as _warn __all__ = ["GzipFile", "open", "compress", "decompress"] @@ -16,24 +20,12 @@ READ, WRITE = 1, 2 -def U32(i): - """Return i as an unsigned integer, assuming it fits in 32 bits. - If it's >= 2GB when viewed as a 32-bit unsigned int, return a long. - """ - if i < 0: - i += 1 << 32 - return i - -def LOWU32(i): - """Return the low-order 32 bits, as a non-negative int""" - return i & 0xFFFFFFFF - -def write32u(output, value): +def _write32u(output, value): # The L format writes the bit pattern correctly whether signed # or unsigned. output.write(struct.pack("