replace deprecated ZInputSream and ZOutputStream