'Parse a legacy object, creating it but not reading the file.'

@staticmethod
def _parse_legacy_object_header(magic, f):

    bufsize = 1024
    decomp = zlib.decompressobj()
    header = decomp.decompress(magic)
    start = 0
    end = (-1)
    while (end < 0):
        extra = f.read(bufsize)
        header += decomp.decompress(extra)
        magic += extra
        end = header.find('\x00', start)
        start = len(header)
    header = header[:end]
    (type_name, size) = header.split('    ', 1)
    size = int(size)
    obj_class = object_class(type_name)
    if (not obj_class):
        raise ObjectFormatException(('Not    a    known    type:    %s' % type_name))
    return obj_class()
