[DataPipe] Fixes an issue where TarArchiveReader closes stream when read into a buffer (#65877)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65877
Fixes #65808
Test Plan: Imported from OSS
Reviewed By: ejguan
Differential Revision: D31296041
Pulled By: NivekT
fbshipit-source-id: cdcad3a333ae9781d6063678a122a128955b0ff4