Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
using mostly the same techniques as the read stream Signed-off-by: Robin Appelman <robin@icewind.nl>