Re: Enhancement request..xz support.

  • From: <tpgww@xxxxxxxxxxx>
  • To: emelfm2@xxxxxxxxxxxxx
  • Date: Fri, 26 Mar 2010 20:57:55 +1100

On Thu, 25 Mar 2010 11:25:29 -0400
Charles A Edwards <eslrahc@xxxxxxxxxxxxx> wrote:

> On Thu, 25 Mar 2010 23:10:37 +1100
> tpgww@xxxxxxxxxxx wrote:
> 
> > > Add support to the pack/unpack plugin for the .xz file extension.
> > > 
> > > It is based on the lzma sdk and actually uses lzma2 for compression
> > > within an xz wrapper.
> > > 
> > > URL http://tukaani.org/xz/
> > > 
> > > I've added it to filetypes and can unpack without issues but I ran
> > > into a roadblock trying to modify the plugin code to support xz.  

Adding formats to the plugins is not too complicated, though a little care is 
needed.
1. add something to the enumerator which indicates the respective formats (same 
in both plugins)
2. add to the various arrays that relate to that enum (in the corresponding 
order):
     pack commands
     unpack commands
     file extensions
     file mimetypes

> > 
> > Without access to any such files, I need some details. Perhaps you
> > can advise:
> > * file extension always .xz, or .tar.xz, or both, or ... ?
> 
> Both
> 
> > * mimetype is application/x-xz ?
> 
> Yes
> 
> > * xz utility commands-syntax
> 
> Commands-syntax is the same as used with lzma except it is piped thru xz
> tar cvf - "file" | lzma - > "file.tar.lzma"
> for xz
> tar cvf - "file" | xz - > "file.tar.xz"
> 
> IIANM you are running Mandriva 2010.0.
More or less - some things older, some newer ...

> 
> Both lzma and xz provided/handled by  
> xz-4.999.9beta-1mdv2010.0 which you will have installed
Indeed. I hadn't noticed.

You can try the [un]pack plugins in svn. They now have essentially the same 
stuff as for tar.lzma, with s/lzma/xz/

Regards
Tom     


-- 
Users can unsubscribe from the list by sending email to 
emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by 
logging into the web interface.

Other related posts: