Lua binding to bzip?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Lua binding to bzip?

Jeff Sheets
Has anybody made a lua binding to bzip?  I am specifically looking for a
binding capable not only of reading from a bzip file (using a method
similar to LuaZip's), but also capable of creating a bzip file.  Anybody
have anything that matches this they are willing to share?  If not, I'll
be starting on one myself, and will likely release it soon.
--


JJS
"If Ignorance is Bliss, I'll take the Pain."

Reply | Threaded
Open this post in threaded view
|

Re: Lua binding to bzip?

Jeff Sheets
After researching a bit, I remember that I would also need a libtar
binding in lua as well (or combined in some way), and I'm simply not
willing to program all that.  Does LuaZip support writing zip files as
well as reading?

On Mon, 2006-04-24 at 13:56 -0500, Jeff Sheets wrote:
> Has anybody made a lua binding to bzip?  I am specifically looking for a
> binding capable not only of reading from a bzip file (using a method
> similar to LuaZip's), but also capable of creating a bzip file.  Anybody
> have anything that matches this they are willing to share?  If not, I'll
> be starting on one myself, and will likely release it soon.
--


JJS
"If Ignorance is Bliss, I'll take the Pain."

Reply | Threaded
Open this post in threaded view
|

RE: Lua binding to bzip?

Danilo Tuler-2

> After researching a bit, I remember that I would also need a
> libtar binding in lua as well (or combined in some way), and
> I'm simply not willing to program all that.

I wrote a tar reader once, I can try to find it in my drawers...
I used it to read tar.gz files, using gzip reading supported by lzlib.

local gfile = gzip.open("test.tar.gz", "rb")
local tarfile = tar.open(gfile)
local file = tarfile:open("abc.txt")

Is this what you are trying to accomplish?

> Does LuaZip support writing zip files as well as reading?

No. LuaZip uses zziplib under the hood (http://zziplib.sf.net).
Zziplib does not support writing (yet).

-- Danilo

Reply | Threaded
Open this post in threaded view
|

Re: Lua binding to bzip?

Daniel Quintela
In reply to this post by Jeff Sheets
I wrote a Lua binding (zipfs) for libzip.
It provides methods to create/open zip files and to manipulate members
inside them.
It supports BZIP2 type compression as an addition to the standard DEFLATE.

You can find it at:
http://luaforge.net/frs/download.php/1509/kcomplibs-1.0.1-src.tgz
(This tgz contains more libraries you need, tell me if you want only
zipfs sources and my modification to ziplib).

Best regards,
Daniel


Jeff Sheets escribió:

>After researching a bit, I remember that I would also need a libtar
>binding in lua as well (or combined in some way), and I'm simply not
>willing to program all that.  Does LuaZip support writing zip files as
>well as reading?
>
>On Mon, 2006-04-24 at 13:56 -0500, Jeff Sheets wrote:
>  
>
>>Has anybody made a lua binding to bzip?  I am specifically looking for a
>>binding capable not only of reading from a bzip file (using a method
>>similar to LuaZip's), but also capable of creating a bzip file.  Anybody
>>have anything that matches this they are willing to share?  If not, I'll
>>be starting on one myself, and will likely release it soon.
>>    
>>