"packdrake" is a very simple archive extractor and builder used by MandrakeSoft.
IMPLEMENTATION
uncompressing sheme is:
| |
| | | |
$off1 =|*| } | |
|*| } $off2 =|+| }
|*| } $siz1 => 'gzip/bzip2 -d' => |+| } $siz2 => $filename
|*| } |+| }
|*| } | |
| | | |
| | | |
| |
where %data has the following format:
{ 'filename' => [ 'f', $off1, $siz1, $off2, $siz2 ] }
except for symbolink link where it is:
{ 'filename_symlink' => [ 'l', $symlink_value ] }
and directory where it is only
{ 'filename_directory' => [ 'd' ] }
as you can see, there is no owner, group, filemode... an extension could be
made with 'F' (instead of 'f'), 'L' instead of 'l' for exemple.
we do not need them as it is used for DrakX for fast archive extraction and
owner/filemode is for user running only (ie root).
archive file contains concatenation of all bzip2'ed group of files whose
filenames are on input,
then a TOC (describing %data, concatenation of toc_line) follow and a
TOC_TRAILER for summary.
SEE ALSO
packdrake command is a simple executable perl script using this module.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.