Sha256: dfd5ebfe3b776b5cbcaf06513c98f7395ea2b7fdfe79dff37be732dd206ee65f

Contents?: true

Size: 923 Bytes

Versions: 3

Compression:

Stored size: 923 Bytes

Contents

#!/usr/bin/env ruby
require 'rio'
# riogzip: reads from stdin, gzips and writes it to stdout
# example use:
#   riogunzip < afile.txt.gz
# 
# explanation:
#
# rio(?-).gzip
#   rio(?-): a rio that will be connected to stdin or stdout depending how it is used
#   .gzip: filter the input or output through Zlib:Gzip[Reader or Writer]
#
# rio(?-)
#   rio(?-): a rio that will be connected to stdin or stdout depending how it is used
#
# <
#   rio copy operator indicating the direction of data
#   pointed in this direction the rio on the right is read from and the one on the left is
#   written. (or stdin and stdout respectively)
#
rio(?-).gzip > rio(?-)

# could be written this way
# rio(?-) < rio(?-).gzip
#
# this is similar, but reads the entire file in before writing it out
#    rio('-').print!( rio('-').gzip.contents )
#
#rio(?-).gzip.each_record do |rec|
#  rio(?-).print(rec)
#end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rio-0.3.1 ex/riogunzip
rio-0.3.2 ex/riogunzip
rio-0.3.3 ex/riogunzip