LhaLibEn
LhaLib
Summary
LhaLib is a Ruby extension library for unpacking LHarchived file.
Download
packages
https://www.artonx.org/data/lhalib
gems
https://www.artonx.org/data/lhalib/lhalib-0.8.1.gem
https://www.artonx.org/data/lhalib/lhalib-0.8.1-mswin32.gem
source code repositry
https://github.com/arton/lhalib
Licence
This product is forked from LHa for Unix under the distribution condition number 6.
Usage
LhaLib is a ruby module, that only contains one method named 'x'.
require 'lhalib' # simpl extraction LhaLib::x('lharchive.lzh')
- retrun value: number of extracted files.
require 'lhalib' # fetching the information about extracted file or directory LhaLib::x('lharchive.lzh') do |info| puts "name=#{info[:name]}" puts "filesize=#{info[:original_size]}" puts "timestamp=#{info[:stamp]}" puts "permission=#{info[:permission] & 0777}" if (info[:permission] & 040000) != 0 puts 'directory' end end
- retrun value: number of extracted files.
- block: called by LhaLib after extracting a file or directry.
- blck parameter: Hash of the header information.
Notice
The thread safety of Ruby is broken with a block parameter. If you need to keep the Ruby level thread safety, call the method without block parameter.
Thanks
I thanks for the original LHa effort by Mr. Tagawa, Mr. Oki, Mr. Watazaki et al.
Keyword(s):
References:[LhaLib]