(f)
return decode_long(data)
r"""
    >>> import io
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\xff\x00"))
    255
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\xff\x7f"))
    32767
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\x00\xff"))
    -256
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\x00\x80"))
    -32768
    >>> read_long1(io.BytesIO(b"\x00\x00\x00\x00"))
    0
r"""
    >>> import io
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\xff\x00"))
    255
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\xff\x7f"))
    32767
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\x00\xff"))
    -256
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\x00\x80"))
    -32768
    >>> read_long1(io.BytesIO(b"\x00\x00\x00\x00"))
    0
r >>> import io >>> read_long4 ( io . BytesIO ( b \ x02 \ x00 \ x00 \ x00 \ xff \ x00 )) 255 >>> read_long4 ( io . BytesIO ( b \ x02 \ x00 \ x00 \ x00 \ xff \ x7f )) 32767 >>> read_long4 ( io . BytesIO ( b \ x02 \ x00 \ x00 \ x00 \ x00 \ xff )) - 256 >>> read_long4 ( io . BytesIO ( b \ x02 \ x00 \ x00 \ x00 \ x00 \ x80 )) - 32768 >>> read_long1 ( io . BytesIO ( b \ x00 \ x00 \ x00 \ x00 )) 0
def read_long4(f):
    r"""
    >>> import io
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\xff\x00"))
    255
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\xff\x7f"))
    32767
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\x00\xff"))
    -256
    >>> read_long4(io.BytesIO(b"\x02\x00\x00\x00\x00\x80"))
    -32768
    >>> read_long1(io.BytesIO(b"\x00\x00\x00\x00"))
    0
    """

    n = read_int4(f)
    if n < 0:
        raise ValueError("long4 byte count < 0: %d" % n)
    data = f.read(n)
    if len(data) != n:
        raise ValueError("not enough data in stream to read long4")
    return decode_long(data)
def read_long4 ( f ) : n = read_int4 ( f ) if n < 0 : raise ValueError ( "long4 byte count < 0: %d" % n ) data = f . read ( n ) if len ( data ) != n : raise ValueError ( "not enough data in stream to read long4" ) return decode_long ( data )