Il giorno gio 24 ott 2024 alle ore 20:26 Sergey Poznyakoff <g...@gnu.org.ua> ha scritto: > > Hi Matteo, > > > Add a --offset option which allows to extract an archive which is > > embedded in another file or it's not at the start of the device. > > What *practical* use do you envision for this? > > Regards, > Sergey >
Hi Sergey, I'm developing a feature which aligns the file content to the filesystem boundary by adding a PAX comment header. This, along with, the --offset option will allow to extract a Debian package (which is an an archive embedding a tar one), by using under Linux the FICLONERANGE ioctl(), and extract the archive without doing any IO. Another advantage will be that the extracted files will not use any disk space because of the data sharing, so it's possible to do distro upgrades where there is limited space left on the root partition. To actually work, the archive file descriptor needs to be a file and not a pipe. I could share the code but, as is, it depends on --offset, it this is not a problem. Regards, -- Matteo Croce perl -e 'for($t=0;;$t++){print chr($t*($t>>8|$t>>13)&255)}' |aplay