Bug 4460

Summary: seamless xz decompression support in tar
Product: Busybox Reporter: Michael Tokarev <mjt+busybox>
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: enhancement CC: busybox-cvs
Priority: P5    
Version: 1.19.x   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:
Attachments: implementation

Description Michael Tokarev 2011-11-06 18:52:50 UTC
currently, busybox tar does not recognize xz-compressed archives automatically, the code in that place has "TODO" comment.  The attached patch implements the missing functionality.

Some missing bits:

 tar taf  and  tar tJf  does not work: needs to check magic numbers.  Probably need to review all the data offsets passed to all the decompress_*() routines.

 no compression support, -- buzybox xz does not support compression

Thanks.
Comment 1 Michael Tokarev 2011-11-06 18:54:08 UTC
Created attachment 3740 [details]
implementation
Comment 2 Denys Vlasenko 2012-05-27 23:33:03 UTC
Fixed in git:

commit dfc2473b9ed88039697ac89ee2a4301cdaefcf84
Author: Boris Reisig <boris@boris.ca>
Date:   Thu May 24 09:01:55 2012 +0200

    tar: support -J, --xz explicit compression option

    function                                             old     new   delta
    tar_main                                             868     881     +13
    tar_longopts                                         285     290      +5
    packed_usage                                       29267   29270      +3