change from transform to duplex stream
fix special case for 0-length stream array
bump version