def read(file):
    stream = io.BitStream(file)
    mark = stream.readbytes(2).int_le
    code = mark >> 6
    if code in tag_classes:
        self = tag_classes[code]()
    else:
        self = Tag()
    self.code = code
    self.length = mark & 63
    if self.length == 0x3f:
        self.length = stream.readbytes(4).int_le
    self._read(stream)
    return self
dataset/ETHPy150Open tailhook/pyzza/pyzza/tags.py/read/original