nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] Fwd: .gz support, DONE


From: Tilman WEIERS
Subject: Re: [Nano-devel] Fwd: .gz support, DONE
Date: Mon, 11 Jan 2016 19:36:25 +0100
User-agent: Mutt/1.5.22+18 (3306cb186f49) (2013-10-16)

Hi Benno, Mike and everyone:

I know about zlib and also about libbz2. This approach actually requires 
changes to every fread, fwrite, fopen etc in nano and especially in 
src/files.c. This seems an arduous task.

I opted to open a pipe and to invoke gzip simply because I only had 
to change the fopen command. The code can then continue without changing 
every fread, fwrite etc.

Regards,

Tilman

On Sun, Jan 10, 2016 at 03:37:30PM -0500, Mike Frysinger wrote:
> On 10 Jan 2016 20:20, Benno Schulenberg wrote:
> > On Sat, Jan 9, 2016, at 23:58, Mike Frysinger wrote:
> > > zlib has a nice FILE interface
> > 
> > You mean the functions gzopen(), gzread(), gzwrite()?
> 
> yes
> 
> > > the only sane route is to fork/execve ourselves.
> > 
> > Whichever way it is done, this still only adds gzip support.
> > It doesn't allow to edit bzipped nor xzipped nor other kinds
> > of compressed files.
> 
> libbz2 includes a FILE interface too.  i understand the point
> you're trying to make, but i think limited/simple support is
> more in scope for nano.
> 
> > If we add the ability to edit zipped
> > files, it should be generic, it should work for all sorts
> > of compression -- or at least be easily extendible by just
> > modifying one or two lines.
> 
> i don't know about that.  gzipped files (.gz) are just copression.
> zipped files (.zip) are archive+compression.  i don't think we want
> to get anywhere near archives.  same as a tarball.
> 
> as for a generic mechanism, i think that might go beyond what we
> want to get into.  here's what vim does:
> http://vimdoc.sourceforge.net/htmldoc/autocmd.html#gzip-example
> 
> that seems like a lot of work.
> -mike





reply via email to

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