Problem that occurs in the line of more than 4096 bytes.

Merged funkygao/tail@c5abc6d to correct the problem that occurs in the line of more than 4096 bytes.
And add test code.