TPStreamWriter and TPSetWriter could be easily be reduced to a simple callback function, using the new API. There is some logic in the current implementations, are we interested to preserve it?