Performance improvements and add copyToStream method with test.
Update changelog