Closed as duplicate of#61232
Description
Proposal Details
tar archive are not indexed, but if our input implement io.ReaderAt
, we can do a first scan pass (seeking over the data parts) and build a fs.FS()
, then users can access random files in the archive without having to extract the archive
A use case I have in mind is the oci-archive format that uses uncompressed tar archive (the blobs inside the archive are compressed), today all operations require the archive to be extracted first containers/image#2869
There is an existing implementation already https://github.com/nlepage/go-tarfs, but it really on the current code behavior to work (https://github.com/nlepage/go-tarfs/blob/7b1a8fac13d9033f2b1fdad64486c19ad8803cb2/fs.go#L70).