add stream-implementation-specific reader/writer functions for stream copying