bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Disk device for tar files?


From: Juhana Sadeharju
Subject: [Bug-tar] Disk device for tar files?
Date: Tue, 2 Oct 2007 19:41:02 +0300

Hello. I would like to access files in tar.gz and tar.bz2
packages without untarring the files to disk. This done
as a loop disk device would make the access transparent.

Has that been done yet?

Some design notes:

The disk files are read in blocks. The file-block query will be
 <file> <read offset> <file-block size>
That can be done now by
 tar xzOf package.tar.gz <filepath> | tail --bytes +<read offset>
 | head --bytes <file-block size>
but that takes too much time.

Can gzip data be uncompressed starting from the middle of file? Unknown.
Can bzip2 data be uncompressed starting from the middle of file? Yes.

If "yes", then we may create an file/block index for faster
access. But now "yes" answers does not help because tar cannot
find the file headers. Also, in the case of tar.bz2 packages,
bzip2recover extracts all the blocks, not a given range of blocks.

Two programs should help:
 -zcat/bczat with ability to start from the middle of file
 -tar with ability to start from the middle of file

If the files inside the tar package are large we also need
a way to seek in the tar package.

Juhana




reply via email to

[Prev in Thread] Current Thread [Next in Thread]