Convert between pipes and chunked files