def METHOD_NAME(raw):
    # header
    headerstr = "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"
    data = (magic, version,
            off_Entities, len_Entities,
            off_Planes, len_Planes,
            off_Vertices, len_Vertices,
            off_Visibility, len_Visibility,
            off_Nodes, len_Nodes,
            off_Texture_Information, len_Texture_Information,
            off_Faces, len_Faces,
            off_Lightmaps, len_Lightmaps,
            off_Leaves, len_Leaves,
            off_Leaf_Face_Table, len_Leaf_Face_Table,
            off_Leaf_Brush_Table, len_Leaf_Brush_Table,
            off_Edges, len_Edges,
            off_Face_Edge_Table, len_Face_Edge_Table,
            off_Models, len_Models,
            off_Brushes, len_Brushes,
            off_Brush_Sides, len_Brush_Sides,
            off_Pop, len_Pop,
            off_Areas, len_Areas,
            off_Area_Portals, len_Area_Portals) = struct.unpack_from(headerstr, raw)
    if struct.pack("BBBB", magic>>24, (magic>>16)&0xff, (magic>>8)&0xff, magic&0xff) != "PSBI": die("Bad header")
    if version != 38: die("Bad version")
    Leaves = []
    leaf_Size = 28
    for i in range(len_Leaves / leaf_Size):
        (brush_or,
         cluster,
         area,
         bbox_minX, bbox_minY, bbox_minZ,
         bbox_maxX, bbox_maxY, bbox_maxZ,
         first_leaf_face, num_leaf_faces,
         first_leaf_brush, num_leaf_brushes) = struct.unpack_from("IHHhhhhhhHHHH", raw, off_Leaves + i*leaf_Size)
        Leaves.append((first_leaf_face, num_leaf_faces))
    print "Leaves: %d" % len(Leaves)
    Leaf_Face_Table = []
    leafface_Size = 2
    for i in range(len_Leaf_Face_Table / leafface_Size):
        Leaf_Face_Table.append(struct.unpack_from("H", raw, off_Leaf_Face_Table + i*leafface_Size)[0])
    Faces = []
    face_Size = 20
    for i in range(len_Faces / face_Size):
        (plane, plane_Size,
         first_edge, num_edges,
         texture_info,
         style0, style1, style2, style3,
         lightmap_offset) = struct.unpack_from("HHIHHBBBBI", raw, off_Faces + i*face_Size)
        Faces.append((first_edge, num_edges, lightmap_offset))
    print "Faces: %d" % len(Faces)
    Face_Edge_Table = []
    faceedge_Size = 4
    for i in range(len_Face_Edge_Table / faceedge_Size):
        Face_Edge_Table.append(struct.unpack_from("i", raw, off_Face_Edge_Table + i*faceedge_Size)[0])
    Edges = []
    edge_Size = 4
    for i in range(len_Edges / edge_Size):
        (v0, v1) = struct.unpack_from("HH", raw, off_Edges + i*edge_Size)
        Edges.append((v0, v1))
    print "Edges: %d" % len(Edges)
    Vertices = []
    vert_Size = 12
    for i in range(len_Vertices / vert_Size):
        v = struct.unpack_from("fff", raw, off_Vertices + i*vert_Size)
        Vertices.append(convCoord(v))
    print "Vertices: %d" % len(Vertices)
    ents = struct.unpack_from("%ds" % len_Entities, raw, off_Entities)[0][1:-3] # opening { and final }+nul
    Entities = []
    for ent in ents.split("}\n{"):
        entdata = {}
        for line in ent.lstrip("\n").rstrip("\n").split("\n"):
            k,v = line.lstrip('"').rstrip('"').split('" "')
            entdata[k] = v
        Entities.append(entdata)
    return Leaves, Leaf_Face_Table, Faces, Face_Edge_Table, Edges, Vertices, Entities