Sha256: 278bdd8e812d898f3ac9354ad42a912ed77f8c1a2d592e03fe78ec532aa48d16

Contents?: true

Size: 612 Bytes

Versions: 3

Compression:

Stored size: 612 Bytes

Contents

#!/usr/bin/env ruby
require 'rio'
# riogzip: reads from stdin, gzips and writes it to stdout
# example use:
#   riogzip < afile.txt > 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

rio('-').gzip < rio('-')

# 
# could also be written:
# rio('-') > rio('-').gzip
# 

Version data entries

3 entries across 3 versions & 1 rubygems

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