Commits

linjunhalida committed feca5dd

format readme

Comments (0)

Files changed (1)

-= Libarchive/Ruby
+# Libarchive/Ruby
 
 Copyright (c) 2009 SUGAWARA Genki <sgwr_dts@yahoo.co.jp>
 
-== Description
+## Description
 
 Ruby bindings for Libarchive.
 
 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.
 
-== Support archive (from Libarchive 2.6.0)
-=== reading
+## Support archive (from Libarchive 2.6.0)
+
+### reading
+
 * gzip compression
 * bzip2 compression
 * compress/LZW compression
 * 'mtree' format
   * lzma compression not supported
 
-=== writing
+### writing
+
 * gzip compression
 * bzip2 compression
 * compress/LZW compression
 * shar archives
 * GNU and BSD 'ar' archives
 
-== Project Page
+## Project Page
 
 http://rubyforge.org/projects/libarchive
 
-== Source Code
+## Source Code
 
 https://bitbucket.org/winebarrel/libarchive-ruby
 
-== Dependency
+## Dependency
 
 Libarchive/Ruby depend on Libarchive.
 
 Please install Libarchive. (version 2.6.0 or more is recommended)
 
-== Install
+## Install
 
 gem install libarchive
 
-== Example
-=== reading archive
+## Example
+
+### reading archive
+
+:::ruby
     require 'libarchive'
-    
+        
     Archive.read_open_filename('foo.tar.gz') do |ar|
       while entry = ar.next_header
         name = entry.pathname
         data = ar.read_data
-    
+        
         #data = ""
         #ar.read_data(1024) do |x|
         #  data << x
         #end
-    
+        
         puts "#{name} (size=#{data.size})"
       end
     end
 
-=== creating archive
+### creating archive
+
+:::ruby
     require 'libarchive'
-    
+        
     Archive.write_open_filename('foo.tar.bz2', Archive::COMPRESSION_BZIP2, Archive::FORMAT_TAR) do |ar|
       Dir.glob('*.c').each do |fn|
         ar.new_entry do |entry|
           entry.pathname = fn
           ar.write_header(entry)
           ar.write_data(open(fn) {|f| f.read })
-    
+        
           #open(fn) do |f|
           #  ar.write_data do
           #    f.read(1024)
       end
     end
 
-=== creating archive by extarnal program
-    require 'libarchive'
-    
-    Archive.write_open_filename('foo.tar.lzo', 'lzop', Archive::FORMAT_TAR_USTAR) do |ar|
-      ...
-    end
+### creating archive by extarnal program
 
-== License
+```ruby
+require 'libarchive'
+
+Archive.write_open_filename('foo.tar.lzo', 'lzop', Archive::FORMAT_TAR_USTAR) do |ar|
+  ...
+end
+```
+
+## License
+
     Copyright (c) 2009 SUGAWARA Genki <sgwr_dts@yahoo.co.jp>
     All rights reserved.
     
     OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
     DAMAGE.
 
-=== Static link library
+### Static link library
+
 Libarchive/Ruby(mswin32) contains Libarchive(2.6.0) and libbzip2(1.0.5).
 
 * Libarchive
   * http://code.google.com/p/libarchive/
-  * see {COPYING.libarchive}[link:files/COPYING_libarchive.html]
+  * see [[https://bitbucket.org/winebarrel/libarchive-ruby/src/tip/COPYING.libarchive?at=default|COPYING.libarchive]]
 
 * libbzip2
   * http://www.bzip.org/
-  * see {LICENSE.libbzip2}[link:files/LICENSE_libbzip2.html]
+  * see [[https://bitbucket.org/winebarrel/libarchive-ruby/src/tip/LICENSE.libbzip2?at=default|LICENSE.libbzip2]]