def unpackFile(lines):
    sizes = {}
    currentFileStart = None
    currentFileName = None

    for i in range(0,len(lines)):
        if i+4<len(lines) and isDividerLine(lines[i]) and isSpacerLine(lines[i+1]) and isSpacerLine(lines[i+3]) and isDividerLine(lines[i+4]):
            if currentFileName:
                fileContents = '\n'.join(lines[currentFileStart:i])
                sizes[currentFileName] = len(fileContents)
            currentFileStart = i+5
            currentFileName = lines[i+2].strip()[2:-2].strip()
    if currentFileName:
        fileContents = '\n'.join(lines[currentFileStart:i])
        sizes[currentFileName] = len(fileContents)