def METHOD_NAME(src: str, dst: str):
    f = loadFileAsStream(src)
    token = f.readUInt64()
    sizeUnpackedChunk = f.readUInt64()
    _ = f.readUInt64()  # sizePacked
    sizeUnpacked = f.readUInt64()
    assert token == 0x9e2a83c1, DecompressionError("Invalid header in downloaded mod")
    chunkSizes = []
    sizeFound = 0
    while sizeFound < sizeUnpacked:
        chunkSizeCompressed = f.readUInt64()
        chunkSizeUnompressed = f.readUInt64()
        chunkSizes.append((chunkSizeCompressed, chunkSizeUnompressed))
        sizeFound += chunkSizeUnompressed
    assert sizeFound == sizeUnpacked, DecompressionError("Invalid chunk sizes in downloaded mod")
    with open(dst, 'wb', buffering=64 * 1024) as of:
        for i, (csCompressed, csUncompressed) in enumerate(chunkSizes):
            chunkData = f.readBytes(csCompressed)
            uncompressedChunkData = zlib.decompress(chunkData)
            del chunkData
            assert len(uncompressedChunkData) == csUncompressed, DecompressionError(
                "Decompression of downloaded mod chunk failed verification")
            assert len(uncompressedChunkData) == sizeUnpackedChunk or i + 1 == len(chunkSizes), DecompressionError(
                "Chunk of downloaded mod is not the expected size")
            of.write(uncompressedChunkData)
            del uncompressedChunkData