in reply to how to split html file?

If you want each of the parts to end up as a valid html file on its own, this could be a very tricky process. An html parsing module would be required, along with a fairly good knowledge of the original html structure and content, and some fairly clear and detailed notions about how to establish cut-off points and how to distribute information among the output files. It could get very ugly.

If you just want to break a stream of bytes into two or more pieces, such that when the pieces are put together again you get the original file, then it's just a question of how many pieces you want, or (equivalently) how large each piece should be, copying right quantity of data from the input to each distinct output file.

So, what are you actually trying to accomplish by splitting an html file into pieces?