libarchive-static-ruby186 1.0.0-i386-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.txt +143 -0
  2. data/lib/libarchive_ruby.so +0 -0
  3. data/libarchive.c +1762 -0
  4. metadata +69 -0
data/README.txt ADDED
@@ -0,0 +1,143 @@
1
+ = Libarchive/Ruby
2
+
3
+ Copyright (c) 2009 SUGAWARA Genki <sgwr_dts@yahoo.co.jp>
4
+
5
+ == Description
6
+
7
+ Ruby bindings for Libarchive.
8
+
9
+ Libarchive is a programming library that can create and read several different streaming archive formats, including most popular tar variants, several cpio formats, and both BSD and GNU ar variants.
10
+
11
+ == Support archive (from Libarchive 2.6.0)
12
+ === reading
13
+ * gzip compression
14
+ * bzip2 compression
15
+ * compress/LZW compression
16
+ * GNU tar format (including GNU long filenames, long link names, and
17
+ sparse files)
18
+ * Solaris 9 extended tar format (including ACLs)
19
+ * Old V7 tar archives
20
+ * POSIX ustar
21
+ * POSIX pax interchange format
22
+ * POSIX octet-oriented cpio
23
+ * SVR4 ASCII cpio
24
+ * Binary cpio (big-endian or little-endian)
25
+ * ISO9660 CD-ROM images (with optional Rockridge extensions)
26
+ * ZIP archives (with uncompressed or "deflate" compressed entries)
27
+ * GNU and BSD 'ar' archives
28
+ * 'mtree' format
29
+ * lzma compression not supported
30
+
31
+ === writing
32
+ * gzip compression
33
+ * bzip2 compression
34
+ * compress/LZW compression
35
+ * POSIX ustar
36
+ * POSIX pax interchange format
37
+ * "restricted" pax format, which will create ustar archives except for entries that require pax extensions (for long filenames, etc).
38
+ * ACLs not supported
39
+ * POSIX octet-oriented cpio
40
+ * SVR4 "newc" cpio
41
+ * shar archives
42
+ * GNU and BSD 'ar' archives
43
+
44
+ == Project Page
45
+
46
+ http://rubyforge.org/projects/libarchive
47
+
48
+ == Source Code
49
+
50
+ http://coderepos.org/share/browser/lang/ruby/libarchive/trunk/
51
+
52
+ == Dependency
53
+
54
+ Libarchive/Ruby depend on Libarchive.
55
+
56
+ Please install Libarchive. (version 2.6.0 or more is recommended)
57
+
58
+ == Install
59
+
60
+ gem install libarchive
61
+
62
+ == Example
63
+ === reading archive
64
+ require 'libarchive_ruby'
65
+
66
+ Archive.read_open_filename('foo.tar.gz') do |ar|
67
+ while entry = ar.next_header
68
+ name = entry.pathname
69
+ data = ar.read_data
70
+
71
+ #data = ""
72
+ #ar.read_data(1024) do |x|
73
+ # data << x
74
+ #end
75
+
76
+ puts "#{name} (size=#{data.size})"
77
+ end
78
+ end
79
+
80
+ === creating archive
81
+ require 'libarchive_ruby'
82
+
83
+ Archive.write_open_filename('foo.tar.bz2', Archive::COMPRESSION_BZIP2, Archive::FORMAT_TAR_USTAR) do |ar|
84
+ Dir.glob('*.c').each do |fn|
85
+ ar.new_entry do |entry|
86
+ entry.copy_stat(fn)
87
+ entry.pathname = fn
88
+ ar.write_header(entry)
89
+ ar.write_data(open(fn) {|f| f.read })
90
+
91
+ #open(fn) do |f|
92
+ # ar.write_data do
93
+ # f.read(1024)
94
+ # end
95
+ #end
96
+ end
97
+ end
98
+ end
99
+
100
+ === creating archive by extarnal program
101
+ require 'libarchive_ruby'
102
+
103
+ Archive.write_open_filename('foo.tar.lzo', 'lzop', Archive::FORMAT_TAR_USTAR) do |ar|
104
+ ...
105
+ end
106
+
107
+ == License
108
+ Copyright (c) 2009 SUGAWARA Genki <sgwr_dts@yahoo.co.jp>
109
+ All rights reserved.
110
+
111
+ Redistribution and use in source and binary forms, with or without modification,
112
+ are permitted provided that the following conditions are met:
113
+
114
+ * Redistributions of source code must retain the above copyright notice,
115
+ this list of conditions and the following disclaimer.
116
+ * Redistributions in binary form must reproduce the above copyright notice,
117
+ this list of conditions and the following disclaimer in the documentation
118
+ and/or other materials provided with the distribution.
119
+ * The names of its contributors may be used to endorse or promote products
120
+ derived from this software without specific prior written permission.
121
+
122
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
123
+ ANY EXPRESS OR IMPLIED WARRANTIES,
124
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
125
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
126
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
127
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
128
+ OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
129
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
130
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
131
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
132
+ DAMAGE.
133
+
134
+ === Static link library
135
+ Libarchive/Ruby(mswin32) contains Libarchive(2.6.0) and libbzip2(1.0.5).
136
+
137
+ * Libarchive
138
+ * http://people.freebsd.org/~kientzle/libarchive/
139
+ * see {COPYING.libarchive}[link:files/COPYING_libarchive.html]
140
+
141
+ * libbzip2
142
+ * http://www.bzip.org/
143
+ * see {LICENSE.libbzip2}[link:files/LICENSE_libbzip2.html]
Binary file